HowTo Install Redmine (> 2.5.x) on Heroku¶
Ok, after months of try-and-fail I was finally able to do it.
As it's my first Rails application i had no idea of how to do it, so I looked for different tutorials. Finally here my own:
- http://railsguides.net/2012/04/28/how-to-deploy-redmine-to-heroku/
- http://tygertown.us/redmine-on-heroku/
Install Redmine¶
First i got the newest stable version of Redmine (2.5 at this time)
Edit: Navigate into your project with your terminal:
Then as everywhere, we have to remove those files from .gitignore
Gemfile.lock Gemfile.local public/plugin_assets config/initializers/session_store.rb config/initializers/secret_token.rb config/configuration.yml config/email.yml
As I always had problems with the database, I just removed this whole block from the Gemfile
database_file = File.join(File.dirname(__FILE__), "config/database.yml")
if File.exist?(database_file)
database_config = YAML::load(ERB.new(IO.read(database_file)).result)
...
else
warn("No adapter found in config/database.yml, please configure it first")
end
else
warn("Please configure your config/database.yml first")
end
and added instead just this to the Gemfile
Then finally install the gems. Don't get confused by log messages like "Please configure your config/database.yml first", heroku will do that for you
Now get the secret token with
Next, you create a app at heroku (we're supposing you are already registered at heroku and all that it brings with it)
- In config/environment.rb we have to remove (or comment) line 10, where it says
- In config/application.rb we have to add an additional line between line 13 and line 14 and add this: config.assets.initialize_on_precompile = false and it should look like this
Now we are finally ready to commit our changes
Now just get the database ready and chose the default language, when you are asked
There you go, open your redmine and log in with your credentials
Your username is admin and your password is admin as well.
Configure E-Mail¶
First you have to add the Sendgrid add-on to heroku
This is just a free-200-mails-per-day version (-> see Add-On-Description )
Then you do create the following file for the email configurations: config/configuration.yml
In this file you only have the following content (adjust Username and Password to yours, you can find them at the add-on page when accessing through your heroku app)
production:
delivery_method: :smtp
smtp_settings:
address: "smtp.sendgrid.net"
port: 25
authentication: :plain
domain: "heroku.com"
user_name: "SENDGRID_USERNAME"
password: "SENDGRID_PASSWORD"
Once again, commit and push your changes
There you go, enjoy!
I know this is not the cleanest way at some steps, but it works and I hope to help others as well ;)