Reputation: 14504
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
Upvotes: 0
Views: 433
Reputation: 230286
You can always shell out.
system('rails server')
or
`rails server` # backticks
Upvotes: 4
Reputation: 11904
The easiest way is to put backticks around the command:
`rails server`
But what are you trying to do?
Upvotes: 2