I’m working through the Rails Engines tutorial at Getting Started with Engines — Ruby on Rails Guides. I’m using ruby 1.9.3
and
rails 3.1.12 on Linux. I’m stuck on section 4.1. When I try to access
localhost:3000/blog I get:
Started GET “/blog” for 127.0.0.1 at 2013-12-26 15:25:12 -0500
ActionController::RoutingError (No route matches [GET] “/blog”):
Rendered
/home/XXX/.rvm/gems/ruby-1.9.3-p484/gems/actionpack-3.1.12/lib/action_dispatch/middleware/templates/rescues/routing_error.erb
within rescues/layout (47.4ms)
On Thursday, December 26, 2013 8:41:21 PM UTC, jsnark wrote:
I’m working through the Rails Engines tutorial at Getting Started with Engines — Ruby on Rails Guides. I’m using ruby 1.9.3 and
rails 3.1.12 on Linux. I’m stuck on section 4.1. When I try to access
localhost:3000/blog I get:
That guide is for the rails development branch (i.e currently it’s
probably tracking rails 4.1), so it may differ significantly from rails
3.1.12. I don’t thing 3.1.x is maintained anymore, however the rails
3.2.x
guides are at Ruby on Rails Guides: Getting Started with Engines and the
rails 4.0.x guides are at http://guides.rubyonrails.org.
I would start by picking one of those versions and going along with the
corresponding guide
If you haven’t already, try restarting your local Rails application.
I’ve lost track of what still doesn’t get reloaded automatically, but
stoping the local app and restarting tends to cure quite a lot of these
issues.
In particular, if you added the route after the application was
started, there’s a good chance that the running application doesn’t
actually know even though the rake routes command claims it exists
(since it just freshly loaded everthing ;-).
Thanks. I upgraded to 3.2.16. Actually, I am not very concerned about
this because all my applications run on an intranet and are not
accessible
outside my company. The users here are not sophisticated enough to
exploit
any security holes in rails.
I am now going to merge several rails applications into a single one
using
engines so that they remain separated. Many of the models appear in
multiple applications (now engines) and have some methods in common. I
want to keep my code DRY. I did not see how to factor out the common
methods while going through the tutorial. Some pointers would be
appreciated.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.