Jammit in Heroku

Posted by mauro on Oct 5, 2010 in Rails |

Heroku Jammit allows the automation of compiling and commiting/deploying your assets to Heroku.

Fork me on GitHub

13 Comments

Brett
Dec 10, 2010 at %I:%M %p

This is exactly what I’m looking for, but I could use your help understanding this fully…

Why would you ever want to delete the assets locally?

What’s the full deployment process moving forward with Jammit? Right now the deployment process w/o Jammit is:
git add .
git commit -a -m “xxxxxx”
git push
git push heroku

How does that get updated with Jammit?

Thank you!


 
mauro
Dec 10, 2010 at %I:%M %p

hi there,

the recommendation is to always clean the local repository

is you want to deploy with jammit using my plugin you can make

heroku jammit:deploy

this recompile the assets, commited it, then push and then delete, if you want leave the assets locally you can run

heroku jammit:add

this recompile the asset and commited it and then just push

git push heroku

cheers!


 
Brett
Dec 11, 2010 at %I:%M %p

very nice, thank you! It seems to be working fine, though on Heroku I do get this error:

Jammit Warning: Asset compression disabled — Java unavailable

Have you seen that before?


 
Brett
Dec 11, 2010 at %I:%M %p

This might be related, using your plugin (which is awesome) do you still need this in the rakefile?

require ‘jammit’
Jammit.package!


 
mauro
Dec 13, 2010 at %I:%M %p

this is a warning of jammit gem

you can see there

http://documentcloud.github.com/jammit/doc/Jammit.html
——-
If we don’t have a working Java VM, then disable asset compression and complain loudly.

# File ‘lib/jammit.rb’, line 159

def self.disable_compression
@compress_assets = false
warn(“Asset compression disabled — Java unavailable.”)
end
—–


 
Brett
May 17, 2011 at %I:%M %p

Hi Mauro, is this solution still supported? I recently upgraded my heroku gem and the heroku_herocutter plugin broke, breaking the jammit plugin as well…

$ heroku plugins:install git://github.com/hone/heroku_herocutter.git
Could not initialize heroku_herocutter: undefined method `list’ for class `Heroku::Command::Plugins’

Are you attempting to install a Rails plugin? If so, use the following:

Rails 2.x:
script/plugin install git://github.com/hone/heroku_herocutter.git

Rails 3.x:

Thanks


 
mauro
May 17, 2011 at %I:%M %p

mmm seems that herocutter istn’t working with new ruby but if you want to use my plugin you just can do a clone inside ~/.heroku/plugins, like this

cd ~/.heroku/plugins && git clone git://github.com/kylejginavan/heroku_jammit.git

tell me if you have doubts

regards


 
Brett
May 23, 2011 at %I:%M %p

@mauro, thanks for the reply. I have the plugin installed but when you try to use it the plugin fails:

===== Deploying assets for to heroku…

! Invalid path.
! Syntax is: git@heroku.com:.git where is your app’s name

fatal: The remote end hung up unexpectedly
[FAIL]

Are you not getting that error?


 
mauro
May 26, 2011 at %I:%M %p

what cmd is not working for you? for me is working ok

mauro@tuquito ~/Rails/stringshub[master]$ heroku jammit:add
===== Compiling assets…[OK]
===== Commiting assets…[OK]
===== Done…
mauro@tuquito ~/Rails/stringshub[master]$ heroku jammit:delete
===== Deleting compiled assets…[OK]
===== Commiting deleted assets…[OK]
===== Done…
mauro@tuquito ~/Rails/stringshub[master]$ heroku jammit:add
===== Compiling assets…[OK]
===== Commiting assets…[OK]
===== Done…

mauro@tuquito ~/Rails/test-jammit[master]$ heroku jammit:deploy
===== Compiling assets…[OK]
===== Commiting assets…[OK]
===== Done…
===== Deploying assets for test-jammit to heroku…
Counting objects: 366, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (341/341), done.
…….


 
mauro
Jun 2, 2011 at %I:%M %p

my friend yesterday i pushed some fixes to the gem, maybe this fix your problem, tell me if you have another problem

see you


 
mauro
Jun 2, 2011 at %I:%M %p

this one

https://github.com/chebyte/heroku_jammit


 
Stephen
Feb 4, 2012 at %I:%M %p

I tried to use this today. When I try:
$ heroku plugins:install git@github.com:kylejginavan/heroku_jammit.git

All I get is : ! Could not install heroku_jammit. Please check the URL and try again.

Any ideas?
Thanks


 
mauro
Feb 6, 2012 at %I:%M %p

works for me

heroku plugins:install git@github.com:kylejginavan/heroku_jammit.git
heroku_jammit installed

but you can try this way

mkdir -p ~/.heroku/plugins
cd ~/.heroku/plugins
git clone git@github.com:kylejginavan/heroku_jammit.git

then you can see the plugins with

heroku plugins

regards!


 

Reply

Copyright © 2014 Chebyte's Blog All rights reserved.