Howto install Redmine on Heroku

A little howto to get Redmine running on Heroku:

  1. Install Redmine locally. Follow instructions given on the Redmine Install page. I used development mode only in this step.
  2. Setup git in the repository with git init
  3. Edit the .gitignore file, and do the following operations in it:
    • remove Gemfile.lock,
    • remove /config/initializers/secret_token.rb,
    • add .svn
  4. Edit the Gemfile file, and change the part declaring gems for SQLite3 and PostgreSQL this way:
    # Database gems
    platforms :mri, :mingw do
      group :production do
        gem "pg", ">= 0.11.0"
      end
    
      group :development do
        gem "sqlite3"
      end
    end
    
  5. Run bundle install
  6. Edit config/environment.rb to comment out the exit in case of plugins in vendor:
    # Load the rails application
    require File.expand_path('../application', __FILE__)
    
    # Make sure there's no plugin in vendor/plugin before starting
    vendor_plugins_dir = File.join(Rails.root, "vendor", "plugins")
    if Dir.glob(File.join(vendor_plugins_dir, "*")).any?
      $stderr.puts "Plugins in vendor/plugins (#{vendor_plugins_dir}) are no longer allowed. " +
        "Please, put your Redmine plugins in the `plugins` directory at the root of your " +
        "Redmine directory (#{File.join(Rails.root, "plugins")})"
      #exit 1
    end
    
    # Initialize the rails application
    RedmineApp::Application.initialize!
    
  7. Add files to the Git index with git add .
  8. Commit files with git commit -m"Blank Redmine"
  9. Create the Heroku application with heroku create
  10. Push the commit to Heroku with git push heroku master
  11. Migrate database on Heroku with heroku run rake db:migrate
  12. Load default values on Heroku with heroku run rake redmine:load_default_data
  13. Restart your Redmine server on Heroku with heroku ps:restart

This way you have a Redmine server running just fine on Heroku.

For the record, I used Ruby 1.9.3, Rails 3.2.8, Redmine 2.1.0 and Heroku Toolbelt 2.32.4 (and also tried successfully with Redmine 2.0.3 on Rails 3.2.6).

About Muriel Salvan

I am a freelance project manager and polyglot developer, expert in Ruby and Rails. I created X-Aeon Solutions and rivierarb Ruby meetups. I also give trainings and conferences on technical topics. My core development principles: Plugins-oriented architectures, simple components, Open Source power, clever automation, constant technology watch, quality and optimized code. My experience includes big and small companies. I embrace agile methodologies and test driven development, without giving up on planning and risks containment methods as well. I love Open Source and became a big advocate.
Git, Heroku, Howto, Ruby, Ruby on Rails, Web development , , , , ,

2 comments


  1. Pingback: Howto add email notifications to your Redmine install on Heroku | Muriel's Tech Blog

Leave a Reply

Your email address will not be published. Required fields are marked *