Delirium tremens
2009-Sep-26 05:29 UTC
I''m restarting to work with ruby on rails, but having configurations problems
I have the Shovell source code from the book Simply Rails 2, but I''m having problems running it. <pre>"Getting started Here’s how to get rolling: 1. Create your databases and edit config/database.yml Rails needs to know your login and password. 2. Use script/generate to create your models and controllers To see all available options, run it without parameters. 3. Set up a default route and remove or rename this file Routes are set up in config/routes.rb."</pre> I took step 1, then since the models and controllers are already generated for a source code that already exists, I skipped step 2 and since a default route is already set for a source code that already exists, I skipped step 3. My config/roubes.rb has map.root :controller => "stories", but http://localhost:3000/ still doesn''t load the stories controller index. Why?
Katherine
2009-Sep-26 05:46 UTC
Re: I''m restarting to work with ruby on rails, but having configurations problems
I do not follow that book although it is updated for Rails 2.0. Make sure you have map.resources :stories on routes,rb On Sep 26, 1:29 pm, Delirium tremens <pedbe...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I have the Shovell source code from the book Simply Rails 2, but I''m > having problems running it. > > <pre>"Getting started > Here’s how to get rolling: > > 1. > Create your databases and edit config/database.yml > > Rails needs to know your login and password. > 2. > Use script/generate to create your models and controllers > > To see all available options, run it without parameters. > 3. > Set up a default route and remove or rename this file > > Routes are set up in config/routes.rb."</pre> > > I took step 1, then since the models and controllers are already > generated for a source code that already exists, I skipped step 2 and > since a default route is already set for a source code that already > exists, I skipped step 3. > > My config/roubes.rb has map.root :controller => "stories", buthttp://localhost:3000/still doesn''t load the stories controller > index. Why?
Delirium tremens
2009-Sep-26 05:47 UTC
Re: I''m restarting to work with ruby on rails, but having configurations problems
On 26 set, 02:29, Delirium tremens <pedbe...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I have the Shovell source code from the book Simply Rails 2, but I''m > having problems running it. > > <pre>"Getting started > Here’s how to get rolling: > > 1. > Create your databases and edit config/database.yml > > Rails needs to know your login and password. > 2. > Use script/generate to create your models and controllers > > To see all available options, run it without parameters. > 3. > Set up a default route and remove or rename this file > > Routes are set up in config/routes.rb."</pre> > > I took step 1, then since the models and controllers are already > generated for a source code that already exists, I skipped step 2 and > since a default route is already set for a source code that already > exists, I skipped step 3. > > My config/roubes.rb has map.root :controller => "stories", buthttp://localhost:3000/still doesn''t load the stories controller > index. Why?I hadn''t deleted public/index.html, but now I''m getting the error message http://pastie.org/631341 How to solve?
Delirium tremens
2009-Sep-26 06:02 UTC
Re: I''m restarting to work with ruby on rails, but having configurations problems
On 26 set, 02:47, Delirium tremens <pedbe...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On 26 set, 02:29, Delirium tremens <pedbe...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > I have the Shovell source code from the book Simply Rails 2, but I''m > > having problems running it. > > > <pre>"Getting started > > Here’s how to get rolling: > > > 1. > > Create your databases and edit config/database.yml > > > Rails needs to know your login and password. > > 2. > > Use script/generate to create your models and controllers > > > To see all available options, run it without parameters. > > 3. > > Set up a default route and remove or rename this file > > > Routes are set up in config/routes.rb."</pre> > > > I took step 1, then since the models and controllers are already > > generated for a source code that already exists, I skipped step 2 and > > since a default route is already set for a source code that already > > exists, I skipped step 3. > > > My config/roubes.rb has map.root :controller => "stories", buthttp://localhost:3000/stilldoesn''t load the stories controller > > index. Why? > > I hadn''t deleted public/index.html, but now I''m getting the error > messagehttp://pastie.org/631341How to solve?After deleting public/index.html, I renamed application.rb to application_controller.rb, then used rake to migrate my data with rake db:migrated and it worked!
Richard Navarrete
2009-Sep-26 06:12 UTC
Re: I''m restarting to work with ruby on rails, but having configurations problems
http://lmgtfy.com/?q=uninitialized+constant+ApplicationController This code must be from before 2.3... you need to update it: :; rake rails:update Or, you can rename the controllers/application.rb file to controllers/application_controller.rb - but you''re better off running the command. Depending on how old the code is, you might create a whole new rails app, then copy your code to it or replace config files with the new ones and create any missing folders. Lots of folks went through this upgrading to 2.3 or 2.3.2... google it a bit. Richard Try the first link, you might read up on On Sat, Sep 26, 2009 at 12:47 AM, Delirium tremens <pedbessa-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>wrote:> > On 26 set, 02:29, Delirium tremens <pedbe...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > I have the Shovell source code from the book Simply Rails 2, but I''m > > having problems running it. > > > > <pre>"Getting started > > Here’s how to get rolling: > > > > 1. > > Create your databases and edit config/database.yml > > > > Rails needs to know your login and password. > > 2. > > Use script/generate to create your models and controllers > > > > To see all available options, run it without parameters. > > 3. > > Set up a default route and remove or rename this file > > > > Routes are set up in config/routes.rb."</pre> > > > > I took step 1, then since the models and controllers are already > > generated for a source code that already exists, I skipped step 2 and > > since a default route is already set for a source code that already > > exists, I skipped step 3. > > > > My config/roubes.rb has map.root :controller => "stories", > buthttp://localhost:3000/still doesn''t load the stories controller > > index. Why? > > I hadn''t deleted public/index.html, but now I''m getting the error > message http://pastie.org/631341 How to solve? > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---