Reputation: 730
I'm comfortable with starting my own rails project but am trying to view and run on a local server downloaded source codes from github etc.
I have downloaded a number of source codes (for example, those provided by the railscasts site. I then cd to the relevant directory and rails server
. I then get the standard rails help sheet beginning:
Usage:
rails new APP_PATH [options]
Options:
-r, [--ruby=PATH] # Path to the Ruby binary of your choice
localhost:3000 also obviously doesn't then point me to the app
I am running rails 3 and I believe I have tried this with rails 3 apps and had no luck.
My immediate thoughts are that I need to do some standard tasks like install the appropriate gems etc. but I'm not sure and come up against a bit of block from looking at other questions (as I presume it is so obvious)
Upvotes: 3
Views: 383
Reputation: 16888
It depends somewhat on the version of Rails that's included. Older Railscasts source would be in Rails 2.x, which would require you use that version of rails.
The best thing you can do is install RVM so that you can have multiple versions of Ruby and Rails installed. Create gemsets for Rails 3.0 and Rails 2.3, and use the Rails 2.3 gemset when running older Rails apps (which are run using script/server
rather than rails server
).
Upvotes: 2