I just migrated to Rails4 from 3.12 and I use FriendlyId, which was working fine in Rails 3.12 I followed the instructions I found here http://richonrails.com/articles/friendlyid-and-rails-4#.U6fTOY1_v_4
so my gemfile features:
gem 'friendly_id', '~> 5.0.0'
Using friendly_id 5.0.4
But I keep getting the following error message:
NameError: uninitialized constant <Classname>::FriendlyId
for each Class that resorts to FriendlyId
I saw this NameError in SongsController#index uninitialized constant Song::FriendlyId But in my case, bundle install doesn't change anything
I had this same problem with Rails 4 - and I fixed it by restarting spring:
$ spring stop
I ran the console again and it went back to working.
make sure you restart the console after bundling.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With