nitefall
2006-May-06 22:18 UTC
[Rails] New Rails app is not working... I am missing something
Hi, So I have two rails applications working on my box. Theya re both tutorials that I walked through step by step. Now I am trying to write my own application and something is not working. My server is OS X 10.3.x. I am using Apache 1.3.x as the webserver with fcgi. As I mentioned before all is well with the apps that I had walk through tutorials with, but my app is not working. I think the issue lies with Apache. -- OK Here we go I was able to create my rails app (rails asset_track) I was able to set up my website to point the public directory of my app, and I get the "Welcome Aboard" page at http://example.com/asset/ I was able to create a controller (ruby script/generate scaffold Asset Admin) but when I go to www.example.com/asset/admin I get the following Not Found The requested URL /asset/admin was not found on this server. Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request. Apache/1.3.33 Server at www.example.com Port 80 What am I missing? I have copied the settings for the virtual server in httpd.conf I have also copied the settings in ..../public/.htaccess Any ideas? -- Posted via http://www.ruby-forum.com/.
Peter Michaux
2006-May-07 04:09 UTC
[Rails] New Rails app is not working... I am missing something
Can you run this Rails application with Webrick? Then you will know for sure it is Apache. Peter On 5/6/06, nitefall <nitefall@comcast.net> wrote:> Hi, > So I have two rails applications working on my box. Theya re both > tutorials that I walked through step by step. > > Now I am trying to write my own application and something is not > working. > > My server is OS X 10.3.x. I am using Apache 1.3.x as the webserver with > fcgi. > > As I mentioned before all is well with the apps that I had walk through > tutorials with, but my app is not working. > > I think the issue lies with Apache. -- OK Here we go > > I was able to create my rails app (rails asset_track) > I was able to set up my website to point the public directory of my app, > and I get the "Welcome Aboard" page at http://example.com/asset/ > I was able to create a controller (ruby script/generate scaffold Asset > Admin) > but when I go to www.example.com/asset/admin I get the following > > Not Found > The requested URL /asset/admin was not found on this server. > > Additionally, a 404 Not Found error was encountered while trying to use > an ErrorDocument to handle the request. > Apache/1.3.33 Server at www.example.com Port 80 > > > What am I missing? > > I have copied the settings for the virtual server in httpd.conf > I have also copied the settings in ..../public/.htaccess > > Any ideas? > > > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
nitefall
2006-May-07 08:06 UTC
[Rails] Re: New Rails app is not working... I am missing something
Peter Michaux wrote:> Can you run this Rails application with Webrick? Then you will know > for sure it is Apache. > > PeterHow do I do this? -- Posted via http://www.ruby-forum.com/.
Peter Michaux
2006-May-07 14:29 UTC
[Rails] Re: New Rails app is not working... I am missing something
> How do I do this?Super easy to start webrick. To create a new app and run it with webrick $ rails new_app $ cd new_app $ script/server Then navigate to localhost:3000 to see the Rails welcome page after that works, try it for your_app $ cd your_app $ script/server Then navigate to localhost:3000 and then navigate to localhost:3000/asset/admin I was surprised you are using apache when webrick is so easy to use for development. Peter On 5/7/06, nitefall <nitefall@comcast.net> wrote:> Peter Michaux wrote: > > Can you run this Rails application with Webrick? Then you will know > > for sure it is Apache. > > > > Peter > > How do I do this? > > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
nitefall
2006-May-07 22:27 UTC
[Rails] Re: New Rails app is not working... I am missing something
Well... Starting Webrick was easy... I got the following message when went to http://www.example.com/asset/admin/ Application error Change this error message for exceptions thrown outside of an action (like in Dispatcher setups or broken Ruby code) in public/500.html I am really uncertain what is not working here. -- Posted via http://www.ruby-forum.com/.
nitefall
2006-May-07 22:40 UTC
[Rails] Re: New Rails app is not working... I am missing something
This file is on the server asset_track/app/controllers/admin_controller.rb What is going on here... It seems to think that the file is missing... But it is there. -- Posted via http://www.ruby-forum.com/.
nitefall
2006-May-07 22:50 UTC
[Rails] Re: New Rails app is not working... I am missing something
>From development.logRecognition failed for "/asset/admin" /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/routing.rb:488:in `recognition_failed'' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/routing.rb:478:in `recognize!'' /usr/local/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/dispatcher.rb:38:in `dispatch'' /usr/local/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/webrick_server.rb:115:in `handle_dispatch'' /usr/local/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/webrick_server.rb:81:in `service'' /usr/local/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'' /usr/local/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'' /usr/local/lib/ruby/1.8/webrick/server.rb:155:in `start_thread'' /usr/local/lib/ruby/1.8/webrick/server.rb:144:in `start'' /usr/local/lib/ruby/1.8/webrick/server.rb:144:in `start_thread'' /usr/local/lib/ruby/1.8/webrick/server.rb:94:in `start'' /usr/local/lib/ruby/1.8/webrick/server.rb:89:in `each'' /usr/local/lib/ruby/1.8/webrick/server.rb:89:in `start'' /usr/local/lib/ruby/1.8/webrick/server.rb:79:in `start'' /usr/local/lib/ruby/1.8/webrick/server.rb:79:in `start'' /usr/local/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/webrick_server.rb:67:in `dispatch'' /usr/local/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/commands/servers/webrick.rb:59 /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `require__'' /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `require'' /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:147:in `require'' /usr/local/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/commands/server.rb:30 /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `require__'' /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `require'' /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:147:in `require'' script/server:3 -- Posted via http://www.ruby-forum.com/.
nitefall
2006-May-07 22:53 UTC
[Rails] Re: New Rails app is not working... I am missing something
Perhaps with Apache there is something wrong with mod_rewirte... but the above log entries are all to do with webrick. I have no idea where to go from here. -- Posted via http://www.ruby-forum.com/.
Ray Baxter
2006-May-07 23:41 UTC
[Rails] Re: New Rails app is not working... I am missing something
nitefall wrote:> Starting Webrick was easy... I got the following message when went to > http://www.example.com/asset/admin/ > > Application errorDo you have a file app/controller/admin_controller.rb? -- Ray
Ray Baxter
2006-May-07 23:50 UTC
[Rails] Re: New Rails app is not working... I am missing something
Ray Baxter wrote:> nitefall wrote: > >> Starting Webrick was easy... I got the following message when went >> to http://www.example.com/asset/admin/ >> >> Application error > > Do you have a file app/controller/admin_controller.rb? >I should have written, "Do you have a file app/controller/asset_controller.rb?" If you do, does that file have a method admin? -- Ray
nitefall
2006-May-08 05:19 UTC
[Rails] Re: New Rails app is not working... I am missing something
Ray Baxter wrote:> I should have written, "Do you have a file > app/controller/asset_controller.rb?" > > If you do, does that file have a method admin? > > -- > > RayNegative... I do not have a file called asset_controller.rb Perhaps because I have not tried to create a scaffold for it yet?? Should I create one? -- Posted via http://www.ruby-forum.com/.
Ray Baxter
2006-May-08 18:33 UTC
[Rails] Re: New Rails app is not working... I am missing something
nitefall wrote:> Ray Baxter wrote: >> I should have written, "Do you have a file >> app/controller/asset_controller.rb?" >> >> If you do, does that file have a method admin? > > Negative... I do not have a file called asset_controller.rb Perhaps > because I have not tried to create a scaffold for it yet?? > > Should I create one?If you want to access the url http://www.example.com/asset/admin as you were doing in an earlier post then need an asset controller that contains an admin action. In that same post you said that you had created an admin controller, so perhaps you need to create an asset action in that controller and access the url http://www.example.com/admin/asset. -- Ray
nitefall
2006-May-09 14:05 UTC
[Rails] Re: New Rails app is not working... I am missing something
Ray Baxter wrote:> > If you want to access the url http://www.example.com/asset/admin as you > were doing in an earlier post then need an asset controller that > contains an admin action. > > In that same post you said that you had created an admin controller, so > perhaps you need to create an asset action in that controller and access > the url http://www.example.com/admin/asset. > > > -- > > RayThe path to the application is http://www.example.com/asset/ In other words... /asset is aliased (in apache) to the ./public directory of the application. When I used webbrick I used http://www.example.com:3000/admin Admin is the controller, not asset. Eitherway I get the issue of some files not being in the right place. -- Posted via http://www.ruby-forum.com/.
nitefall
2006-May-09 14:12 UTC
[Rails] Re: New Rails app is not working... I am missing something
Wait! Looking back now I see that when using webrick I indeed went to example.com:3000/asset/admin. So I just tried it again, using webrick as the server, and the URL www.example.com:3000/admin and I get hte same error. Application error Change this error message for exceptions thrown outside of an action (like in Dispatcher setups or broken Ruby code) in public/500.html Any ideas from here? What other info do you need? -- Posted via http://www.ruby-forum.com/.
Charlie Bowman
2006-May-09 14:16 UTC
[Rails] Re: New Rails app is not working... I am missing something
What''s in your development_log? On Tue, 2006-05-09 at 16:12 +0200, nitefall wrote:> Wait! > > Looking back now I see that when using webrick I indeed went to > example.com:3000/asset/admin. > > So I just tried it again, using webrick as the server, and the URL > www.example.com:3000/admin and I get hte same error. > > Application error > > Change this error message for exceptions thrown outside of an action > (like in Dispatcher setups or broken Ruby code) in public/500.html > > Any ideas from here? What other info do you need? > >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060509/c5cf576c/attachment.html
nitefall
2006-May-09 14:59 UTC
[Rails] Re: Re: New Rails app is not working... I am missing somethi
Charlie Bowman wrote:> What''s in your development_log?Recognition failed for "/asset" /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/routing.rb:488:in `recognition_failed'' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/routing.rb:478:in `recognize!'' /usr/local/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/dispatcher.rb:38:in `dispatch'' /usr/local/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/webrick_server.rb:115:in `handle_dispatch'' /usr/local/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/webrick_server.rb:81:in `service'' /usr/local/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'' /usr/local/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'' /usr/local/lib/ruby/1.8/webrick/server.rb:155:in `start_thread'' /usr/local/lib/ruby/1.8/webrick/server.rb:144:in `start'' /usr/local/lib/ruby/1.8/webrick/server.rb:144:in `start_thread'' /usr/local/lib/ruby/1.8/webrick/server.rb:94:in `start'' /usr/local/lib/ruby/1.8/webrick/server.rb:89:in `each'' /usr/local/lib/ruby/1.8/webrick/server.rb:89:in `start'' /usr/local/lib/ruby/1.8/webrick/server.rb:79:in `start'' /usr/local/lib/ruby/1.8/webrick/server.rb:79:in `start'' /usr/local/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/webrick_server.rb:67:in `dispatch'' /usr/local/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/commands/servers/webrick.rb:59 /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `require__'' /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `require'' /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:147:in `require'' /usr/local/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/commands/server.rb:30 /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `require__'' /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `require'' /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:147:in `require'' script/server:3 -- Posted via http://www.ruby-forum.com/.
Charlie Bowman
2006-May-09 17:14 UTC
[Rails] Re: Re: New Rails app is not working... I am missing somethi
whats in your config/routes.rb? It seems like rails doesn''t know how to map your url. On Tue, 2006-05-09 at 16:59 +0200, nitefall wrote:> Charlie Bowman wrote: > > What''s in your development_log? > > Recognition failed for "/asset" > /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/routing.rb:488:in > `recognition_failed'' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/routing.rb:478:in > `recognize!'' > /usr/local/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/dispatcher.rb:38:in > `dispatch'' > /usr/local/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/webrick_server.rb:115:in > `handle_dispatch'' > /usr/local/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/webrick_server.rb:81:in > `service'' > /usr/local/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'' > /usr/local/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'' > /usr/local/lib/ruby/1.8/webrick/server.rb:155:in `start_thread'' > /usr/local/lib/ruby/1.8/webrick/server.rb:144:in `start'' > /usr/local/lib/ruby/1.8/webrick/server.rb:144:in `start_thread'' > /usr/local/lib/ruby/1.8/webrick/server.rb:94:in `start'' > /usr/local/lib/ruby/1.8/webrick/server.rb:89:in `each'' > /usr/local/lib/ruby/1.8/webrick/server.rb:89:in `start'' > /usr/local/lib/ruby/1.8/webrick/server.rb:79:in `start'' > /usr/local/lib/ruby/1.8/webrick/server.rb:79:in `start'' > /usr/local/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/webrick_server.rb:67:in > `dispatch'' > /usr/local/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/commands/servers/webrick.rb:59 > /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in > `require__'' > /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in > `require'' > /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:147:in > `require'' > /usr/local/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/commands/server.rb:30 > /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in > `require__'' > /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in > `require'' > /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:147:in > `require'' > script/server:3 >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060509/b07fd319/attachment-0001.html
nitefall
2006-May-10 03:15 UTC
[Rails] Re: Re: Re: New Rails app is not working... I am missing som
Charlie Bowman wrote:> whats in your config/routes.rb? It seems like rails doesn''t know how to > map your url.-------------- Here is my routes.rb file: ActionController::Routing::Routes.draw do |map| # The priority is based upon order of creation: first created -> highest priority. # Sample of regular route: # map.connect ''products/:id'', :controller => ''catalog'', :action => ''view'' # Keep in mind you can assign values other than :controller and :action # Sample of named route: # map.purchase ''products/:id/purchase'', :controller => ''catalog'', :action => ''purchase'' # This route can be invoked with purchase_url(:id => product.id) # You can have the root of your site routed by hooking up '''' # -- just remember to delete public/index.html. # map.connect '''', :controller => "welcome" # Allow downloading Web Service WSDL as a file with an extension # instead of a file named ''wsdl'' map.connect '':controller/service.wsdl'', :action => ''wsdl'' # Install the default route as the lowest priority. map.connect '':controller/:action/:id'' end -- Posted via http://www.ruby-forum.com/.
Dave Ringoen
2006-May-10 18:11 UTC
[Rails] Re: New Rails app is not working... I am missing something
My email server is down, so by the time you get this, I''m sure you''ll have the answer. If not... If you''re using webrick, the url will be /admin, not /asset/admin, unless you''ve put something in your routes.rb file to make recognize /asset/admin. Dave On 5/7/06 4:53 PM, "nitefall" <nitefall@comcast.net> wrote:> Perhaps with Apache there is something wrong with mod_rewirte... but > the above log entries are all to do with webrick. > > I have no idea where to go from here.
Nitefall
2006-May-12 22:27 UTC
[Rails] New Rails app is not working... I am missing something
Really... I want to be using Apache... What does the routes.rb file specify (routes clearly) Is it only for webrick?? Or does it effect Apache as well?? What can I do to get Apache to recognize these files?? Is something incorrect with the rewrite module? Help ?!?!?! Dave Ringoen wrote:> My email server is down, so by the time you get this, I''m sure you''ll > have > the answer. If not... > > If you''re using webrick, the url will be /admin, not /asset/admin, > unless > you''ve put something in your routes.rb file to make recognize > /asset/admin. > > Dave-- Posted via http://www.ruby-forum.com/.
Nitefall
2006-May-13 07:02 UTC
[Rails] Re: New Rails app is not working... I am missing something
OK I deleted the application directory (/path/to/asset_track/) Re-created it (rails asset_track) set ../config/databse.yml correctly Built the Admin Controller (ruby script/generate scaffold Asset Admin) Started WebBrick and it seems to be working. But it still is not working in Apache. How can I get this working in Apache? -- Posted via http://www.ruby-forum.com/.
Nitefall
2006-May-14 17:14 UTC
[Rails] Re: New Rails app is not working... I am missing something
So here I have found the weak spot... If it doesn''t work under Apache, then Rails becomes useless to me very quickly. There is clearly some simple setting that needs to be changed, and I don''t know what it is... I have completely disassembled my httpd.conf file, and the .htaccess file in the apps public directory. It looks fine to me, but then... Something has this not working, and I don''t know exactly what I need to be looking for. Nitefall wrote:> OK > > I deleted the application directory (/path/to/asset_track/) > > Re-created it (rails asset_track) > > set ../config/databse.yml correctly > > Built the Admin Controller (ruby script/generate scaffold Asset Admin) > > Started WebBrick and it seems to be working. > > But it still is not working in Apache. > > How can I get this working in Apache?-- Posted via http://www.ruby-forum.com/.
Jon Gretar Borgthorsson
2006-May-14 17:38 UTC
[Rails] Re: New Rails app is not working... I am missing something
If it''s not working in Apache but works in Webrick then clearly you are having problem with rights. Check what user the apache server is running on. It''s propably apache or nobody. Then set the user of your app to be that. It could also be that your public/.htaccess is wrong. Make sure it points to dispatch.fcgi instead of .cgi. On 5/14/06, Nitefall <nitefall@comcast.net> wrote:> So here I have found the weak spot... If it doesn''t work under Apache, > then Rails becomes useless to me very quickly. > > There is clearly some simple setting that needs to be changed, and I > don''t know what it is... I have completely disassembled my httpd.conf > file, and the .htaccess file in the apps public directory. It looks > fine to me, but then... > > Something has this not working, and I don''t know exactly what I need to > be looking for. > > > > Nitefall wrote: > > OK > > > > I deleted the application directory (/path/to/asset_track/) > > > > Re-created it (rails asset_track) > > > > set ../config/databse.yml correctly > > > > Built the Admin Controller (ruby script/generate scaffold Asset Admin) > > > > Started WebBrick and it seems to be working. > > > > But it still is not working in Apache. > > > > How can I get this working in Apache? > > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- -------------- Jon Gretar Borgthorsson http://www.jongretar.net/
Nitefall
2006-May-14 19:31 UTC
[Rails] Re: Re: New Rails app is not working... I am missing somethi
J?n Borg??rsson wrote:> If it''s not working in Apache but works in Webrick then clearly you > are having problem with rights. Check what user the apache server is > running on. It''s propably apache or nobody. Then set the user of your > app to be that. > > It could also be that your public/.htaccess is wrong. Make sure it > points to dispatch.fcgi instead of .cgi. >It was the permissions :) The thing I don''t understand is this. The files for the tutorial application I built with the help of a book were owned by webmaster:www I set the file ownership and permissions for my new app identically to the tutorial''s ownership and permissions. Going through each directory one at a time... making sure all was the same. My app didn''t run. But a simple chmod -R www:www ./myapp/ made my applicaiton work. There must be a single thing that I missed in the tutorial app. Well... All is well now. Thanks!!! -- Posted via http://www.ruby-forum.com/.