How to Install Redmine on Local Server and Push to Heroku - A Step by Step Guide

Posted on 11/09/2010

We needed to install Redmine on Heroku using Amazon S3 for file storage. Here is how we did it. Our development server is Ubuntu 10.4.

Setup Local Environment

Dependencies

sudo gem install rails --version 2.3.5 
sudo gem install rack --version 1.0.1

Install Redmine

mkdir redmine-working-directory
cd redmine-working-directory
git init
git remote add redmine git://github.com/edavis10/redmine.git
git fetch redmine
# confirm that redmine/1.0-stable is listed as the last version, then
git merge redmine/1.0-stable

Set Up Database

cp config/database.yml.example config/database.yml
# Configure your /config/database.yml
rake db:create RAILS_ENV=production
rake db:migrate RAILS_ENV=production
# load default data is optional, but recommended
rake redmine:load_default_data RAILS_ENV=production

Install Plugins

ruby script/plugin install redmine_heroku git://github.com/edavis10/redmine_heroku.git
ruby script/plugin install redmine_s3 git://github.com/edavis10/redmine_heroku.git

rake heroku:setup

# delete session_store.rb created by heroku plugin
rm config/intializers/session_store.rb

# generate session store only after installing heroku plugin
# and deleting the sesson store it created, otherwise you're going to get 
Internal Server Error A secret is required to generate an integrity hash for cookie session data. Use config.action_controller.session = { :session_key => "_myapp_session", :secret  => "some secret phrase of at least 30 characters" } in config/environment.rb

rake generate_session_store

Configure S3

# config/s3.yml
production:
  access_key_id: your_access_key
  secret_access_key: your_secret_access_key
  bucket: your_production_bucket
  cname_bucket: false

development:
  access_key_id: your_access_key
  secret_access_key: your_secret_access_key
  bucket: your_development_bucket
  cname_bucket: false

Configure Email

cp config/email.yml.example config/email.yml
# Configure config/email.yml for your SMTP server

# Remove From .gitignore
/config/initializers/session_store.rb
/config/email.yml
/config/database.yml

# Commit your changes
git add .
git commit -m "Initial commit"

Create Heroku Application

heroku create your_heroku_app
git push heroku master

# Push local database to Heroku
heroku db:push

That should do it. Obviously you'll need to add any additional plugins into your development site and then push to Heroku once again (and push your database if you've applied any migrations).


Tags: ruby, rails, heroku, redmine, aws s3

Showing 0 comments

Post a Comment

Microsoft

Microsoft for the Technology That's Right for Your Business

Microsoft offers the tools and applicaitons to share ideas and collaborate in a way that increases your productivity. More businesses rely on the Microsoft platform, applications and development environment. And our expertise in MS means you get a knowledgable team ready to hit the ground running. We've done it for companies big and small, and we're ready to help you.

Ruby on Rails

Ruby on Rails For Sustainable Productivity

The Rails framework allows for rapid, enterprise development without sacrificing durability or scaleability. Our expertise in Rails means you get a solid application in record time. We've built applications from start-ups to Fortune 500 companies, and we can do it for you.

Java 2 Enterprise Edition

Java - The Platform for Enterprise Solutions

The Java 2 Platform, Enterprise Edition (J2EE), defines the standard for developing multitier enterprise applications. The J2EE platform simplifies enterprise applications by basing them on standardized, modular components, by providing a complete set of services to those components, and by handling many details of application behavior automatically, without complex programming. Java is in our blood. Call us about your next project.

Droid Pro

SmartPhone Application Development at idhra

iPhone, Blackberry or Android - we can develop Multi-Platform Applications simultaneously to give you greater market coverage for your application and faster time to market. Let us work with your in-house staff, training them on best practices as we build your application.

Index to Area 51 (last 25 entries)