Project

General

Profile

Actions

Feature #16712

closed

Create an up-to-date documentation for Redmine on Heroku

Added by Sandro Kolly about 10 years ago. Updated almost 10 years ago.

Status:
Closed
Priority:
Low
Assignee:
-
Category:
Documentation
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:

Description

The old description seems very old and a lot has changed in the meantime. I would really appreciate it a lot, if there would be a new and up-to-date documentation for non-rails-pros how to deploy Redmine to Heroku.

Actions #1

Updated by Sandro Kolly almost 10 years ago

  • Status changed from New to Resolved

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:

It's a mix between these two:

First i got the newest stable version of Redmine (2.5 at this time)

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

Edit: Navigate into your project with your terminal:

cd redmine

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

group :production do
  # gems specifically for Heroku go here
  gem "pg", ">= 0.11.0" 
end

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

bundle install

Now get the secret token with

bundle exec rake generate_secret_token

Next, you create a app at heroku (we're supposing you are already registered at heroku and all that it brings with it)

heroku create NAME_FOR_YOUR_APP

To avoid aborting when deploying to heroku, we have to do the following two steps:
  • In config/environment.rb we have to remove (or comment) line 10, where it says
      exit 1
    
  • 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
    ...
    12: module RedmineApp
    13:   class Application < Rails::Application
    14:     config.assets.initialize_on_precompile = false
    15:     # Settings in config/environments/* take precedence over those specified here.
    ...
    

Now we are finally ready to commit our changes

git add -A
git commit -m “prepping for heroku”
git push heroku 2.5-stable:master

Now just get the database ready and chose the default language, when you are asked

heroku run rake db:migrate
heroku run rake redmine:load_default_data

There you go, open your redmine and log in with your credentials

heroku open

Your username is admin and your password is admin as well.

For E-Mail configurations, check the referenced Tutorials.

There you go...

Actions #2

Updated by Etienne Massip almost 10 years ago

Thanks, could you please create an howto in wiki?

Actions #3

Updated by Sandro Kolly almost 10 years ago

Etienne Massip wrote:

Tanks, could you please create an howto in wiki?

Done, but as you can see maybe I did an error and opened a second version (>2.5.x), now i cant delete the first one (>25) that isn't linked in the How-To's.
Maybe you can help me out here

Actions #4

Updated by Etienne Massip almost 10 years ago

Done,thanks again!

Actions #5

Updated by Toshi MARUYAMA almost 10 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF