How do I run two rails apps on one BitNami Windows install at the same time?
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开发者_StackOverflow中文版 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?
You need to change the port that the second instance runs on. In the below picture, taken from here, change the port number of the second instance from 80
to to (say) 81
. Then visit localhost:81
in your browser for the second instance.
(source: moodle.org)
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.
精彩评论