Reputation: 150976
Rails's script/server
is just a few lines:
#!/usr/bin/env ruby
require File.expand_path('../../config/boot', __FILE__)
require 'commands/server'
I wonder where the server
file is? I tried a
find . -name 'server.*'
find . -name 'server'
but can't find it
Upvotes: 3
Views: 2173
Reputation: 7324
You have to look for the files in your related gem repo. Your Ruby is located at
which ruby
Your Rails gem is
bundle show rails
You can go to the dir with
cd `bundle show rails`/lib/commands
Then, open server.rb
Upvotes: 2
Reputation: 5586
In linux they are more likely to be under
/usr/lib/ruby/gems/ruby_version/gems/rails_version/lib/commands
ruby_version and rails_version depends on which versions you are using. The directory structure will also depend on whether or not you are using rvm, but hopefully you can find your way once you get to the /usr/lib/ruby/
directory
Upvotes: 0
Reputation: 150976
thanks. in the case of a Mac, I found that they are on
/Library/Ruby/Gems/1.8/gems/rails-2.3.5/lib/commands/server.rb
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/commands/server.rb
/Users/peter/.gem/ruby/1.8/gems/rails-2.3.5/lib/commands/server.rb
the following are there but doesn't have my Rails 2.3.5 version:
/Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rails-1.2.6/lib/commands/server.rb
/Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/commands/server.rb
Update: Now the question is: which of the above 3 is the one? How can you tell easily?
Upvotes: 0