Redmine on Heroku

04 Mar 2014

Since this isn’t as easy as some posts make it here is how I got it to work:

Clone the redmine git repo and have the 2.4-stable branch checked out

git clone https://github.com/redmine/redmine.git -b 2.4-stable

Remove the following from your .gitignore

  • Gemfile.lock
  • Gemfile.local
  • public/plugin_assets
  • config/initializers/session_store.rb
  • config/initializers/secret_token.rb
  • config/configuration.yml
  • config/email.yml
  • config/database.yml

Install all the gems with bundle. I had to install some packages to get this to work as well since I don’t muck with ruby too much

apt-get install libmagickwand-dev python-dev
bundle install

Now create your heroku app which will setup a git remote for you

heroku create myappname

Edit config/environment.rb and remove/comment the exit 1 line

Edit config/application.rb and add the following line just below class Application < Rails::Application

config.assets.initialize_on_precompile = false

Setup your database stuff. I used the ClearDB module so had to do the following:

https://devcenter.heroku.com/articles/cleardb#configuring-your-ruby-application-to-use-cleardb

If you won’t want to use ClearDB i’m pretty sure if you don’t do anything it will use Postgres automatically…probably

Add and commit your changes

git add -A

git commit -m “prepping for heroku”

git push heroku 2.4-stable:master

Rake stuff

heroku rake generate_secret_token
heroku run rake db:migrate
heroku run rake redmine:load_default_data
Sites I used for reference:
«« Previous Post Next Post »»