Newbie

Hi,

I am a Newbie to Mac and Rails.

I have some rails apps made using instantrails in windows, and have
been trying to setup a mac as a developing machine. And the transition
has not been as smooth as I thought.

I am using Leopard and installed mac ports and Xcode.

I am getting the following errors after I browse to http://0.0.0.0:3000:

ActionController::RoutingError (No route matches “/recipe/list” with
{:method=>:get}):
/opt/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
action_controller/routing/recognition_optimisation.rb:66:in
recognize_path' /opt/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/ action_controller/routing/route_set.rb:386:in recognize’
/opt/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
action_controller/dispatcher.rb:182:in handle_request' /opt/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/ action_controller/dispatcher.rb:110:in dispatch_unlocked’
/opt/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
action_controller/dispatcher.rb:123:in dispatch' /opt/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/ action_controller/dispatcher.rb:122:in synchronize’
/opt/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
action_controller/dispatcher.rb:122:in dispatch' /opt/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/ action_controller/dispatcher.rb:132:in dispatch_cgi’
/opt/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
action_controller/dispatcher.rb:39:in dispatch' /opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/ rails.rb:76:in process’
/opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/…/lib/mongrel/
rails.rb:74:in synchronize' /opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/ rails.rb:74:in process’
/opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:
159:in process_client' /opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb: 158:in each’
/opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:
158:in process_client' /opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb: 285:in run’
/opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:
285:in initialize' /opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb: 285:in new’
/opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:
285:in run' /opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb: 268:in initialize’
/opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:
268:in new' /opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb: 268:in run’
/opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/
configurator.rb:282:in run' /opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/ configurator.rb:281:in each’
/opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/
configurator.rb:281:in run' /opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails: 128:in run’
/opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/
command.rb:212:in run' /opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails: 281 /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/ active_support/dependencies.rb:142:in load_without_new_constant_marking’
/opt/local/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/
active_support/dependencies.rb:142:in load' /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/ active_support/dependencies.rb:521:in new_constants_in’
/opt/local/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/
active_support/dependencies.rb:142:in load' /opt/local/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/commands/servers/ mongrel.rb:64 /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb: 31:in gem_original_require’
/opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:
31:in require' /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/ active_support/dependencies.rb:153:in require’
/opt/local/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/
active_support/dependencies.rb:521:in new_constants_in' /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/ active_support/dependencies.rb:153:in require’
/opt/local/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/commands/
server.rb:49
/opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:
31:in gem_original_require' /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb: 31:in require’
script/server:3

Rendering /opt/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
action_controller/templates/rescues/layout.erb (not_found)

Thanks for your help!!

eduardopa wrote:

I am getting the following errors after I browse to http://0.0.0.0:3000:
action_controller/dispatcher.rb:182:in handle_request' /opt/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/ 158:in each’
/opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:
configurator.rb:281:in run' active_support/dependencies.rb:142:in load’
/opt/local/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/
31:in `require’

I suspect the apps were developed on an earlier version of rails. Do
you know the version of InstantRails that was used for the development?
That would probably identify the version of ROR used.

Its also possible that your routes.rb file is not setup right. Did
you copy over the entire rails projects tree or just the app folder?

I suspect the apps were developed on an earlier version of rails. Do
you know the version of InstantRails that was used for the development?
That would probably identify the version of ROR used.

Norm and Robokos

Thanks for your response.

I get these errors using a new test app created in the new
installation.
The rails version on the mac is 2.0 and on InstantRails is the same
2.0.

I think there is something wrong with the mac installation but I don’t
know what.

I followed this instructions and got the same errors:
http://blog.carlmercier.com/2007/12/14/how-to-fix-that-rubygems-mess-on-leopard/

Thanks again

You can also try a

rake routes >routes.txt

to see what rails believes its routes are… well, what rails knows the
routes are, and you can see if the two of you agree.

It looks like a routes issue. It’s trying to call a route that doesn’t
exist:

ActionController::RoutingError (No route matches “/recipe/list” with
{:method=>:get})

Check your route.rb file which can be found in the config directory.
If there is a map.root declared, maybe try commenting it out and
restarting the app and see if it makes any difference.

Paste the contents of your config/routes.rb file.

-John

Hi John,

Here is the routes.rb file:

ActionController::Routing::Routes.draw do |map|
map.resources :alerts

The priority is based upon order of creation: first created ->

highest priority.

You can have the root of your site routed by hooking up ‘’

– just remember to delete public/index.html.

map.connect ‘’, :controller => ‘store’, :action => ‘index’

Install the default route as the lowest priority.

map.connect ‘:controller/:action/:id’

end

Thank you!

This is the set of errors that I am getting after starting the server:

Exiting
/opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:31:in
gem_original_require': no such file to load -- ruby-debug (MissingSourceFile) from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb: 31:inrequire’
from /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/
active_support/dependencies.rb:153:in require' from /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/ active_support/dependencies.rb:521:innew_constants_in’
from /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/
active_support/dependencies.rb:153:in require' from /Users/rafaelparra/Sites/deasygn/config/environments/ development.rb:22:inload_environment’
from /opt/local/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/initializer.rb:
340:in load_environment' from /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/ active_support/core_ext/kernel/reporting.rb:11:insilence_warnings’
from /opt/local/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/initializer.rb:
333:in load_environment' from /opt/local/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/initializer.rb: 136:inprocess’
from /opt/local/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/initializer.rb:
112:in send' from /opt/local/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/initializer.rb: 112:inrun’
from /Users/rafaelparra/Sites/deasygn/config/environment.rb:13
from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:
31:in gem_original_require' from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb: 31:inrequire’
from /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/
active_support/dependencies.rb:153:in require' from /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/ active_support/dependencies.rb:521:innew_constants_in’
from /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/
active_support/dependencies.rb:153:in require' from /opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/ mongrel/rails.rb:147:inrails’
from /opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/
mongrel_rails:113:in cloaker_' from /opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/ configurator.rb:149:incall’
from /opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/
configurator.rb:149:in listener' from /opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/ mongrel_rails:99:incloaker_’
from /opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/
configurator.rb:50:in call' from /opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/ configurator.rb:50:ininitialize’
from /opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/
mongrel_rails:84:in new' from /opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/ mongrel_rails:84:inrun’
from /opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/
command.rb:212:in run' from /opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/ mongrel_rails:281 from /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/ active_support/dependencies.rb:142:inload_without_new_constant_marking’
from /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/
active_support/dependencies.rb:142:in load' from /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/ active_support/dependencies.rb:521:innew_constants_in’
from /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/
active_support/dependencies.rb:142:in load' from /opt/local/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/commands/ servers/mongrel.rb:64 from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb: 31:ingem_original_require’
from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:
31:in require' from /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/ active_support/dependencies.rb:153:inrequire’
from /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/
active_support/dependencies.rb:521:in new_constants_in' from /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/ active_support/dependencies.rb:153:inrequire’
from /opt/local/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/commands/
server.rb:49
from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:
31:in gem_original_require' from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb: 31:inrequire’
from script/server:3