I am new to Rails, so please forgive me if this is obvious.
I am doing a lot of experimenting, creating to applications, testing features, etc. It got my first scaffolded app running great, but I wanted to create a second app to test a different feature.
I backed up a folder level on my computer, ran $ rails new taskmaster
(a test to-do list app). I ran the scaffolding for the Task
model, fired up the server via $ rails server
, and attempted to load http://localhost:3000
.
But I got a routing error, saying it couldn't find the "members"
route. But members
was from my first Rails app! I thought by firing off $ rails server
in the taskmaster
directory, it would startup the server for that application.
How do I tell the Rails server which application to serve up?
UPDATE
I just discovered that if I:
- Roll back to the fresh install of the first Rails app, before I created the Member scaffold
- Fire up the rails server via
$ rails server
in the application's root directory - Check
http://localhost:3000
It still attempts to go for the members
route, the one that no longer exists because I rolled back via git.
I'm guessing this means something in my /usr/local/
area, relating to my Ruby and Rails initial installs, is mainatining this info (my apps are setup in my Documents folder in my home dir).
I thought that Rails apps were essentially self contained apps inside the directory - you just needed a working Ruby install to get them going. Does the Rails server sit inside each app directory, or is the some overarching Rails server that accommodates all apps?