ruby - Rails 4: Own engine "No route matches" -


i write..

rails new testapp cd testapp/ rails plugin new blog --mountable cd blog/ rails g scaffold post name description:text rake db:migrate cd ../ rails s 

go localhost:3000/blog/posts/index , error "no route matches [get] "/blog/posts/index""

what i'm doing wrong?

putting engine @ random directory inside application won't make magically work. don't know learned technique from, wrong.

you should put engine outside application , require application's gemfile, this:

gem 'blog', :path => '../blog' 

then engine automatically loaded rails.

the engines guide goes more detail. highly recommend reading that.


Comments

Popular posts from this blog

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

html - How to style widget with post count different than without post count -

url rewriting - How to redirect a http POST with urlrewritefilter -