How to use Sprockets Rails plugin on Heroku?
Posted
by Kevin
on Stack Overflow
See other posts from Stack Overflow
or by Kevin
Published on 2010-03-27T19:12:58Z
Indexed on
2010/03/27
19:23 UTC
Read the original article
Hit count: 665
ruby-on-rails
|heroku
Hi,
I just deployed my Rails app to Heroku, but the Javascripts that were using Sprockets plugin don't work.
I understood that, because my Heroku app is read-only, Sprockets won't work. I've found this sprockets_on_heroku plugin that should do the work, but I don't really get how to use it :
- I added
config.gem sprockets
in config/environment.rb - I added
sprockets
in my .gems file - I pushed these on Heroku and Sprockets was successfully installed
- I locally ran
script/plugin install git://github.com/jeffrydegrande/sprockets_on_heroku.git
and the plugin was successfully installed
Nothing changed on Heroku, so I tried to install the plugin on Heroku with heroku plugins:install git://github.com/jeffrydegrande/sprockets_on_heroku.git
, which returned sprockets_on_heroku installed
but then, a heroku restart
or a heroku plugins
command would return this:
~/.heroku/plugins/sprockets_on_heroku/init.rb:1: uninitialized constant ActionController (NameError)
from /opt/local/lib/ruby/gems/1.8/gems/heroku-1.8.3/bin/../lib/heroku/plugin.rb:25:in `load'
from /opt/local/lib/ruby/gems/1.8/gems/heroku-1.8.3/bin/../lib/heroku/plugin.rb:25:in `load!'
from /opt/local/lib/ruby/gems/1.8/gems/heroku-1.8.3/bin/../lib/heroku/plugin.rb:22:in `each'
from /opt/local/lib/ruby/gems/1.8/gems/heroku-1.8.3/bin/../lib/heroku/plugin.rb:22:in `load!'
from /opt/local/lib/ruby/gems/1.8/gems/heroku-1.8.3/bin/../lib/heroku/command.rb:14:in `run'
from /opt/local/lib/ruby/gems/1.8/gems/heroku-1.8.3/bin/heroku:14
from /opt/local/bin/heroku:19:in `load'
from /opt/local/bin/heroku:19
What should I do?
Kevin
© Stack Overflow or respective owner