views:

333

answers:

2

Noob Alert. I am learning RoR, have Windows 7, so I downloaded the latest BitNami stack and installed that.

Ran through the Rails guides and created my first application 'A blog' and everything worked fine.

However, I want to move on to my second rails app, but I don't know how to navigate to it. The first one was at localhost:<port>, and my routes.rb file has map.root => :controller => "home".

When I double click on the index.html file in my 'newapp/public' folder I see the 'Welcome to Rails' page that indicates that this new app was created successfully.

However when I go to localhost/newapp/index I don't see it. I get a routing error:

Routing Error

No route matches "/AddressBook/index" with {:method=>:get}

Help!

[Edit] bump Has anyone gotten a chance to look into this?

+1  A: 
Peter
Peter....thanks for getting back to me so quickly. Where do I find that config file?
marcamillion
Actually...I just found that file - but it was in a 'phpmyadmin' folder. In any case, there is no reference in that file to the port that my main instance uses. There isn't a reference to the second reference. I only see URLs with port 8080, but my main instance is 3000. So it doesn't seem as if this even manages the root dir for my main rails instance. Did a ctrl + F for '3000' which is my port number that I know works and nothing turned up.
marcamillion
ok, sorry I couldn't help.
Peter
A: 

I assume you're starting the first server with something like this:

ruby script/server

Start the second server like this:

ruby script/server -p 3001

You can pass whatever you want instead of 3001. By default, with no -p option, it runs on port 3000.

EDIT: in response to your comment: first thing, make sure it's not a path issue. Find where that file is and make sure the enclosing folder is in your path.

If that doesn't help, I'd try doing development on SQLite instead of MySQL.

Sarah Mei
Thank you for this. It seems I had not initiated the server in my new app build. When I do that, and shut down the other server, it works on the port I want. However, when I try to run both of them at the same time, the issue I come across is what I think of as a 'shared resource' issue. WEBrick boots fine, and binds port 3005, however when I browse to it, I get this message: 'System Error from Ruby.exe: The program can't start because LIBMYSQL.dll is missing from your computer. Try reinstalling the program to fix this problem'. I ran 'gem install mysql', but that doesn't seem to have helped.
marcamillion