Ruby On Rails 3.0 on Windows Fix
On windows Ruby on Rails 3 new commands: rails server, does not work. I hope this is fixed in the released RoR 3.0 but until then, I’ve created a quick and dirty hack.
Create a file in the application ROOT called rails.rb. In the file add the following lines:
command = “ruby script\rails”
$arguments = nilARGV.each do |arg|
$arguments = “#{$arguments}” + “#{arg} ”
endsystem( “#{command} #{$arguments}” )
Now you can call from a command prompt rails server or any other like rails g controller Post.
Paul 12:23 am on February 28, 2010 Permalink |
Be sure to escape the backslash (\) or use a forward slash, or else you'll get a cryptic error message because of the carriage return (r).
Either way, thanks, this solved the exact issue I was having!