Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Redmine installation on MacOSX

Redmine installation on MacOSX

  • A summarized instruction tested on MacOSX 10.7.4 installing Ruby 1.9.3p194 and Rails 3.2.3.

Install brew

  • Follow the instructions on https://github.com/mxcl/homebrew
  • $ /usr/bin/ruby -e "$(/usr/bin/curl -fsSL https://raw.github.com/mxcl/homebrew/master/Library/Contributions/install_homebrew.rb)"

brew hints

  • If brew refuses to download a formula there are several things you can try to circumvent the problem.
  • $ export http_proxy=http://1.2.3.4:1234 to set your HTTP proxy.
  • $ export ftp_proxy=http://1.2.3.4:1234 to set your FTP proxy.
  • Manually download the formular using wget and move it to ~/Library/Caches/Homebrew/ or /Library/Caches/Homebrew/ depending on your installation.

Install MySQL server

  • $ brew install mysql

Install ImageMagick

  • $ brew install imagemagick --disable-openmp
  • Dependency by RMagick as described here.

Install Ruby Version Manager

  • Follow the instructions on https://rvm.io/rvm/install/
  • $ curl -L get.rvm.io | bash -s stable
  • $ source ~/.rvm/scripts/rvm
  • Find the requirements (follow the instructions):
  • $ rvm requirements

Install ruby

  • $ rvm install 1.9.3

Install gems into the global gemset

  • Some gems might be installed into the global gemset since they are needed in other projects too.
  • $ rvm gemset use global
  • $ gem install bundler
  • $ gem install mysql2
  • $ gem install rails
  • $ gem install rake
  • $ gem install rmagick

Prepare the Redmine installation

  • Here are some additions to the succeeding Redmine installation instructions.
  • $ cd ~/Sites
  • $ git clone git://github.com/redmine/redmine.git
  • $ cd redmine

Create a gemset for the project

  • $ rvm gemset create redmine
  • $ rvm gemset use redmine
  • $ rvm --rvmrc --create use 1.9.3-p194@redmine
  • The folder should now contain a .rvmrc file that contains the configuration to load the correct ruby version on cd. You can test it with leaving the directory and going back via cd. Check with rvm gemset list.

Install Redmine

Start the database service

  • $ mysql.server start

Create the database tables

  • $ mysql -u root -p
  • mysql> create database redmine character set utf8;
  • mysql> create user 'redmine'@'localhost' identified by 'my_password';
  • mysql> grant all privileges on redmine.* to 'redmine'@'localhost';

Configure the database connection

  • Follow the instructions on the Redmine page to create a config/database.yml file.

Migrate and seed the database

  • $ bundle exec rake generate_secret_token
  • $ RAILS_ENV=production bundle exec rake db:migrate
  • $ RAILS_ENV=production bundle exec rake redmine:load_default_data

Start Redmine

  • $ rails s -e production -p 3000
  • alternatively: $ ruby script/rails server webrick -e production
@sparrowjack

This comment has been minimized.

Copy link

@sparrowjack sparrowjack commented Jun 3, 2018

mysql2 require ruby version >= 2.0.0, so it's better to install 2.4.1 in 10.13

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.