Rails 4: routing error when mounting an engine in a Rails app as explained in Rails guides

I followed steps on Rails guides on
engineshttp://guides.rubyonrails.org/engines.html and
it faileds when mounting the engine in unicorn Rails application:

unicorn rails s
=> Booting WEBrick
=> Rails 4.0.0 application starting in development on
http://0.0.0.0:3000
=> Run rails server -h for more startup options
=> Ctrl-C to shutdown server
Exiting
/Users/scambour/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/application/routes_reloader.rb:10:in
rescue in execute_if_updated': Rails::Application::RoutesReloader#execute_if_updated delegated to updater.execute_if_updated, but updater is nil: #<Rails::Application::RoutesReloader:0x007fc39aff04f0 @paths=["/Users/scambour/workspace/unicorn/config/routes.rb", "/Users/scambour/workspace/blorgh/config/routes.rb"], @route_sets=[#<ActionDispatch::Routing::RouteSet:0x007fc39ac008b8>, #<ActionDispatch::Routing::RouteSet:0x007fc39c092c18>]> (RuntimeError) from /Users/scambour/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/application/routes_reloader.rb:6:inexecute_if_updated’
from
/Users/scambour/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/application/finisher.rb:69:in
block in <module:Finisher>' from /Users/scambour/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/initializable.rb:30:ininstance_exec’
from
/Users/scambour/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/initializable.rb:30:in
run' from /Users/scambour/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/initializable.rb:55:inblock in run_initializers’
from
/Users/scambour/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/tsort.rb:150:in
block in tsort_each' from /Users/scambour/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/tsort.rb:183:inblock (2 levels) in each_strongly_connected_component’
from
/Users/scambour/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/tsort.rb:219:in
each_strongly_connected_component_from' from /Users/scambour/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/tsort.rb:182:inblock in each_strongly_connected_component’
from
/Users/scambour/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/tsort.rb:180:in
each' from /Users/scambour/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/tsort.rb:180:ineach_strongly_connected_component’
from
/Users/scambour/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/tsort.rb:148:in
tsort_each' from /Users/scambour/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/initializable.rb:54:inrun_initializers’
from
/Users/scambour/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/application.rb:215:in
initialize!' from /Users/scambour/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/railtie/configurable.rb:30:inmethod_missing’
from /Users/scambour/workspace/unicorn/config/environment.rb:5:in <top (required)>' from /Users/scambour/workspace/unicorn/config.ru:3:inrequire’
from /Users/scambour/workspace/unicorn/config.ru:3:in block in <main>' from /Users/scambour/.rvm/gems/ruby-2.0.0-p247/gems/rack-1.5.2/lib/rack/builder.rb:55:ininstance_eval’
from
/Users/scambour/.rvm/gems/ruby-2.0.0-p247/gems/rack-1.5.2/lib/rack/builder.rb:55:in
initialize' from /Users/scambour/workspace/unicorn/config.ru:innew’
from /Users/scambour/workspace/unicorn/config.ru:in <main>' from /Users/scambour/.rvm/gems/ruby-2.0.0-p247/gems/rack-1.5.2/lib/rack/builder.rb:49:ineval’
from
/Users/scambour/.rvm/gems/ruby-2.0.0-p247/gems/rack-1.5.2/lib/rack/builder.rb:49:in
new_from_string' from /Users/scambour/.rvm/gems/ruby-2.0.0-p247/gems/rack-1.5.2/lib/rack/builder.rb:40:inparse_file’
from
/Users/scambour/.rvm/gems/ruby-2.0.0-p247/gems/rack-1.5.2/lib/rack/server.rb:277:in
build_app_and_options_from_config' from /Users/scambour/.rvm/gems/ruby-2.0.0-p247/gems/rack-1.5.2/lib/rack/server.rb:199:inapp’
from
/Users/scambour/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/commands/server.rb:48:in
app' from /Users/scambour/.rvm/gems/ruby-2.0.0-p247/gems/rack-1.5.2/lib/rack/server.rb:314:inwrapped_app’
from
/Users/scambour/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/commands/server.rb:75:in
start' from /Users/scambour/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/commands.rb:78:inblock in <top (required)>’
from
/Users/scambour/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/commands.rb:73:in
tap' from /Users/scambour/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/commands.rb:73:in<top (required)>’
from bin/rails:4:in require' from bin/rails:4:in

Just after adding the path to the blorgh engin into the Gemfile:

source ‘https://rubygems.org

Bundle edge Rails instead: gem ‘rails’, github: ‘rails/rails’

gem ‘rails’, ‘4.0.0’
gem ‘blorgh’, path: “…/blorgh”

running ‘rails s’ failed with the above error.

Any idea what is going wrong here ?
I’m on OS X 10.8.5
Rails 4.0.0
Ruby 2.0.0p247

Thanks

It is fixed, I just had a typo in engine route. :).

Can you please explain , how to add typo ?

I did NOT mean typo as Typo
Softwarehttp://en.wikipedia.org/wiki/Typo_(software) but
the one as Typographical
errorhttp://en.wikipedia.org/wiki/Typographical_error
:slight_smile:

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs