Project

General

Profile

Howto install Redmine on Heroku

Added by Simon Kaminski about 14 years ago

Hi guys!

I need your help please :)

Can you tell me a step by step Tutorial how to get Redmine on Heroku Servers Running?

I'm brand new to Ruby on Rails and wan't to learn it :)

Would be really really nice because I need this BugTrack Quite Fast (before I master Ruby hehe)


Replies (16)

RE: Howto install Redmine on Heroku - Added by Simon Kaminski about 14 years ago

Oh if it's important I'm using Windows 7 x64 ;)

RE: Howto install Redmine on Heroku - Added by Emp Imp about 14 years ago

Based on Eric Davis' comments at http://www.redmine.org/boards/3/topics/8497 here's an overview of what I did:
  • Downloaded redmine to my local machine.
  • Changed the config to use sqlite3 (don't have mysql set up on my system) and added the requisite password line.
  • Created and migrated the db.
  • Verified it would run on my local machine (although I never got to a home page, not sure why, but it doesn't seem to matter)
  • Followed the standard Heroku new app instructions.

Hope that helps you.

RE: Howto install Redmine on Heroku - Added by Matt Kolenda almost 14 years ago

Hello

I'm following up on this old post. I had the same problem as Simon described above. After I got redmine to work locally I followed the steps to push the app to Heroku.

heroku create
heroku rake db:migrate ## THIS FAILED

The extra step I had to take to get Redmine to run on Heroku was to add this line to the config/environment.rb

config.action_controller.session = { :key => "_myapp_session", :secret => "<SOME LONG STRING OF CHARACTERS>" }

Then...
git add .
git commit -m "added config.action_controller.session to config/environment.rb"
git push heroku master

Point the browser to <myapp>.heroku.com and success. Perhaps this info will help the next person who runs into problems installing Redmine on Heroku.

My Dev Machine:
Max OSX 10.6 snow leopartd
Ruby: ree-1.8.7-2010.01 [ x86_64 ]
gem list:
  • LOCAL GEMS ***

actionmailer (2.3.8, 2.3.5, 2.3.4)
actionpack (2.3.8, 2.3.5, 2.3.4)
activerecord (2.3.8, 2.3.5, 2.3.4)
activeresource (2.3.8, 2.3.5, 2.3.4)
activesupport (2.3.8, 2.3.5, 2.3.4)
addressable (2.1.1)
ansi (1.2.1)
bcrypt-ruby (2.1.2)
builder (2.1.2)
bundler (0.9.25)
columnize (0.3.1)
configuration (1.1.0)
contest (0.1.2)
cucumber (0.7.3)
cucumber-rails (0.3.1)
data_objects (0.10.2)
database_cleaner (0.5.2)
diff-lcs (1.1.2)
dm-aggregates (1.0.0.rc3)
dm-core (1.0.0.rc3)
dm-do-adapter (1.0.0.rc3)
dm-migrations (1.0.0.rc3)
dm-sqlite-adapter (1.0.0.rc3)
dm-sweatshop (0.10.0)
dm-timestamps (1.0.0.rc3)
dm-types (1.0.0.rc3)
dm-validations (1.0.0.rc3)
do_sqlite3 (0.10.2)
email_veracity (0.6.0)
extlib (0.9.15)
facets (2.8.4)
fastercsv (1.5.3)
gherkin (1.0.30)
haml (2.2.17)
heroku (1.9.9)
hpricot (0.8.2)
htmlentities (4.2.1)
json (1.1.9)
json_pure (1.4.3)
launchy (0.3.5)
linecache (0.43)
mailfactory (1.4.0)
mime-types (1.16)
mocha (0.9.8)
nokogiri (1.4.2)
ParseTree (3.0.5)
rack (1.1.0, 1.0.1)
rack-test (0.5.4, 0.5.0)
rails (2.3.8, 2.3.5, 2.3.4)
rake (0.8.7)
randexp (0.1.5)
rdoc (2.5.8)
redgreen (1.2.2)
rest-client (1.4.2)
rr (0.10.11)
rspec (1.3.0)
rspec-rails (1.3.2)
ruby-debug (0.10.3)
ruby-debug-base (0.10.3)
RubyInline (3.8.4)
rumbster (1.0.0)
sexp_processor (3.0.4)
shout-bot (0.0.4)
sinatra (1.0)
sinatra-authorization (1.0.0)
sinatra-ditties (0.0.2)
sqlite3-ruby (1.2.5)
stringex (1.1.0)
term-ansicolor (1.0.5)
thor (0.9.9)
tlsmail (0.0.1)
trollop (1.16.2)
turn (0.7.0)
uuidtools (2.1.1)
webmock (1.2.2)
webrat (0.7.1, 0.6.0)
ZenTest (4.3.1)

Steps

git clone http://github.com/edavis10/redmine.git
cd redmine/config
cp database.yml.example datatbase.yml

changed the development: from mysql to sqlite3 as I don't have mysql on my machine

cd ..
rake config/initializers/session_store.rb
rake db:migrate # worked ok, created the tables
script/server # success, server started. I was able to log in with admin

=> Booting WEBrick
=> Rails 2.3.5 application starting on http://0.0.0.0:3000
/Users/mateo/.rvm/gems/ree-1.8.7-2010.01/gems/rails-2.3.5/lib/rails/gem_dependency.rb:119:Warning: Gem::Dependency#version_requirements is deprecated and will be removed on or after August 2010. Use #requirement
=> Call with -d to detach
=> Ctrl-C to shutdown server
[2010-06-15 12:06:15] INFO WEBrick 1.3.1
[2010-06-15 12:06:15] INFO ruby 1.8.7 (2009-12-24) [i686-darwin10.3.0]
[2010-06-15 12:06:15] INFO WEBrick::HTTPServer#start: pid=6491 port=3000

  1. I'm able to log in to localhost:3000 with the default admin user just fine.

heroku create
git push heroku master
heroku rake db:migrate

rake aborted!
A key is required to write a cookie containing the session data. Use config.action_controller.session = { :key => "_myapp_session", :secret => "some secret phrase" } in config/environment.rb

(See full trace by running task with --trace)
(in /disk1/home/slugs/212460_0b29be8_053a/mnt)

  1. Then I made the change above to config/environment.rb, pushed the change to Heroku and success.

Matt

RE: Howto install Redmine on Heroku - Added by Matt Kolenda almost 14 years ago

One other step that I forgot to mention:

You need to make the public/plugin_assets folder writable on heroku.

There are a few ways to do this, I chose the brute force way. There is probably a more elegant way to do this...

cd <rails root folder>
vim .gitignore # remove public/plugin_assets from the file
  1. if the public/plugin_assets folder does not exist, create it and add a README file to it
    git add .
    git commit -m "added the plugin_assets folder to git so heroku would work"
    git push heroku master
    heroku rake db:migrate

So to summarize to get redmine to work on heroku

1) update the environment.rb per the instructions above
2) remove public/plugin_assets from .gitignore
3) if public/plugin_assets does not exist create it
4) git add, git commit, git push heroku master
5) heroku rake db:migrate

Exhale

RE: Howto install Redmine on Heroku - Added by Andrea Salicetti over 13 years ago

What about the feature "Repository"?
I have two Rails application (Redmine and my own) both hosted on Github (both on my account, both repo are private).

My problem is, since Heroku has a read-only file system, how can I configure Redmine (if possible) to be linked to my repo on Github?

I will call my app A and Redmine app R.

I've tried to follow the instructions found on http://www.redmine.org/wiki/1/RedmineRepositories, with the only difference that I've created the local bare copy of A into the root of R (because of heroku's constraints on file system), which caused the creation of <R_root>/*A.git* dir.

After I've re-deployed on heroku R, and in the A project's settings I've configured as SCM "Git" and A.git as Path to .git directory (I've also tried ./A.git).

However, when I point to the tab Repository of A project on Redmine, I got a 500 with message:

"The entry or revision was not found in the repository."

Where am I wrong?
Any suggestion?

Thank you!

RE: Howto install Redmine on Heroku - Added by Bayle Shanks about 13 years ago

I think it is currently impossible to integrate Git or Mercurial repos with a Redmine instance running on Heroku due to the read-only filesystem constraint. I asked Eric Davis and he thinks so too. SVN and CVS don't require Redmine to have a local copy of the repo, and so I think they work, whereas Git and Hg don't.

RE: Howto install Redmine on Heroku - Added by Chris Wolf about 13 years ago

I was able to successfully install redmine-1.1.1 on Heroku, but I needed to perform some additional steps.

1.) Download redmine-1.1.1.tar from downloads area and extract to local dir
2.) You need let Heroku manage gems, so remove the vendor/rails directory from readmine base dir
3.) In the redmine base dir, create a file called ".gems" with the following:

rails --version 2.3.5
i18n --version 0.4.2
rack --version 1.0.1

For testing locally, make sure you have these gems installed and don't rely on rails
bundled in vendor/rails.

Then deploy in the usual manner. i.e.

$ heroku maintenance:on
$ git push heroku master
$ heroku rake db:migrate
$ heroku maintenance:off

Note that "heroku rake db:migrate" only needs to be done once. For further db syncing from local to remote, use "heroku db:push".

Unfortunately, I can't see how it's possible to configure a repository, even an SVN repository
because, according to the Redmine docs, you must have the SVN binaries on the remote side. The docs also say that Redmine does not yet use Ruby-SVN bindings, further implying the binaries requirement.

[[http://www.redmine.org/projects/redmine/wiki/RedmineRepositories]]

RE: Howto install Redmine on Heroku - Added by Chris Wolf about 13 years ago

Well, good news... either heroku does have the svn binaries available, or redmine has implemented svn access in some way to not depend on remote svn binaries (and not updated the docs). I was able to configure an svn repository. (not local to Heroku, obviously)

RE: Howto install Redmine on Heroku - Added by Van Nam Nguyen almost 13 years ago

Thanks Chris Wolf ,Matt Kolenda and Simon Kaminski. I had successfull install Redmine 1.1.1 on Heroku from Windows XP.

RE: Howto install Redmine on Heroku - Added by Jack Royal-Gordon over 12 years ago

Today I tried to install Redmine on Heroku. I handled the session store with no problem. When I tried to create the database, I found that the app used the wrong version of Rails. So I created a Gemfile referencing version 2.3.4 (the rails version referred to in the documentation that came with the distribution) and the processes to create the database and load the default data worked just fine. Then I tried to go to the website. The Heroku logs indicate that I still have the wrong rails version (how could that be if Rake worked okay?). Error message is:

Missing the Rails 2.3.4 gem. Please `gem install -v=2.3.4 rails`, update your RAILS_GEM_VERSION setting in config/environment.rb for the Rails version you do have installed, or comment out RAILS_GEM_VERSION to use the latest version installed.

RE: Howto install Redmine on Heroku - Added by Celso Dantas over 12 years ago

If you're having the issue below:

Missing the Rails 2.3.4 gem. Please `gem install -v=2.3.4 rails`, update your RAILS_GEM_VERSION setting in config/environment.rb for the Rails version you do have installed, or comment out RAILS_GEM_VERSION to use the latest version installed.

I fixed it adding a Gemfile to the root of the application and added:

#Gemfile

gem 'rails', '2.3.11'
gem 'rubytree', '0.6.2'
gem 'coderay', '0.9.7'
gem 'i18n', '0.4.2'

RE: Howto install Redmine on Heroku - Added by Alicia Cozine over 11 years ago

After wrestling with various roadblocks for a couple of days, I just managed to install Redmine 2.1.0 on Heroku Cedar with attachments on S3. I posted a blog tutorial about it, and tried to post a link here, but it was rejected for looking like spam. Any interest in the link? Ideas on how to get it posted?

RE: Howto install Redmine on Heroku - Added by Kintal Lam over 11 years ago

Hi Alicia.
I am interested in your tutorial. Would you please share it to me? Thanks.

RE: Howto install Redmine on Heroku - Added by Kintal Lam over 11 years ago

Alicia Cozine wrote:

After wrestling with various roadblocks for a couple of days, I just managed to install Redmine 2.1.0 on Heroku Cedar with attachments on S3. I posted a blog tutorial about it, and tried to post a link here, but it was rejected for looking like spam. Any interest in the link? Ideas on how to get it posted?

Hi Alicia.
I am interested in your tutorial. Would you please share it to me? Thanks.

RE: Howto install Redmine on Heroku - Added by Andrey Koleshko about 11 years ago

I have posted some time ago article in my blog How to deploy Redmine to Heroku and it looks rather popular, so check it out! It describes not only deploy but how to solve problem with saving attachments on AWS S3 and mail delivery issues.

    (1-16/16)