refinerycms: NoMethodError: undefined method `prepend_path' for nil:NilClass
While setting up refinerycms recently, I kept running into the following error:
speakingurl-rails.rb:8:in `block in <class:Railtie>': undefined method `prepend_path' for nil:NilClass (NoMethodError)
This happened both when creating a new application and integrating refinerycms into an existing application. It occurred when running rails generate refinery:cms
and other rake tasks like rake db:migrate
. After some searching, I came across this explanation.
http://answers.candoerz.com/question/164246/integrating-refinerycms-into-an-existing-rails-application.aspx
What happened was the latest version of sprocket-rails has be published in rubygems. speakingurl-rails, which is dependency for slug support, has not yet been updated to support the new sprocket-rails gem. To resolve this, I had to:
- In Gemfile, add
gem 'sprockets-rails', '~> 2.3.3'
- Run:
bundle update