I just deployed the Rails application in Heroku, but the Javascripts that used the Sprockets plugin do not work.
I realized that since my Heroku app is read-only, Sprockets will not work. I found this sprockets_on_heroku plugin that should do the job, but I really don't understand how to use it:
- I added
config.gem sprockets to config / environment.rb - I added
sprockets to the .gems file - I clicked them on Heroku and Sprockets was successfully installed.
- I ran the
script/plugin install git://github.com/jeffrydegrande/sprockets_on_heroku.git and the plugin was successfully installed
Nothing changed on Heroku, so I tried installing the plugin on Heroku using heroku plugins:install git://github.com/jeffrydegrande/sprockets_on_heroku.git , which returned sprockets_on_heroku installed , but then the heroku restart or heroku plugins will 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
source share