Pimping out Radiant Apps on Heroku: extension bling

/*headdesk*/

Do you find yourself with a migraine from the incessant *headdesk* associated with trying to figure out why your Radiant app that works so beautifully on your dev box turns into a megaFAIL after you try to deploy it on Heroku?

/*headdesk*/

Wait… are you using any radiant extensions?

Aha! Something isn’t explicitly clear in the vast majority of documentation on Radiant extensions: when you install an extension using ./script/extension install extensionName, you’re actually installing the extension as a submodule.  There are some good reasons to install an extension as a submodule: it’s super-easy, and it provides an easy way to update your extensions when the master branch has been updated.

But there is one very good reason NOT to install extensions as submodules: at this time, Heroku doesn’t support the use of submodules.  So that means even if you’ve followed the instructions and gotten it to work in your development environment, once you deploy to Heroku, the extensions disappear.  No listing in the admin panel, no files in your extension directories, everything is broke-ass, and….  /*headdesk*/

So what to do?  Most offering advice recommend that you find a way around this by installing the extension “normally”.   But what is ‘normal?’



We’ll install the Settings plugin as an example, since it is fairly lightweight and provides some functions that would likely be useful for most installations.    Here goes:

Manual path to installation:

1
 wget http://github.com/Squeegy/radiant-settings/tarball/master

will download a file that looks something like

Squeegy-radiant-settings-someOtherStuff.tar.gz

Extract and rename the file and delete the tarball:

1
2
3
tar xzvf Squeegy-radiant-settings-someOtherStuff.tar.gz
mv Squeegy-radiant-settings-someOtherStuff.tar.gz settings
rm Squeegy-radiant-settings-someOtherStuff.tar.gz

Since you’re integrating the extension into the app, you need to… uh… integrate the extension into your database.

1
2
3
cd ../..
rake radiant:extensions:settings:migrate
rake radiant:extensions:settings:update

Start your server using

1
./script/server

and make sure that the settings tab is visible in the admin interface… if not, something didn’t go right.

Now comes the fun part:

making it work on heroku.

1
2
3
4
git add .
git commit -m "manually added settings plugin to support deployment on heroku"
git push heroku master
heroku db:push

Cue choir of angels, and set aside the excedrin: if you check out your app’s admin interface on Heroku, it should now be blinged out with a new tab for your settings extension.

Bookmark and Share

No related posts.


All comments of post - "Pimping out Radiant Apps on Heroku: extension bling":

:Haha! I'am the first! Yeh~

Thank you!

Add a Comment / Trackback url

Comment begin from here or jump up!