Is it possible to create a ruby script that can execute rails commands?
Like:
rails_start.rb:
Class RailsStart
#Start rails server
rails server
end
Is it possible to create a ruby script that can execute rails commands?
Like:
rails_start.rb:
Class RailsStart
#Start rails server
rails server
end
You can always shell out.
system('rails server')
or
`rails server` # backticks
The easiest way is to put backticks around the command:
`rails server`
But what are you trying to do?