Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save sparrowu93/b267672c753da41ca5a855dc402510db to your computer and use it in GitHub Desktop.
Save sparrowu93/b267672c753da41ca5a855dc402510db to your computer and use it in GitHub Desktop.
Redmine installation on macOS #2018

Redmine installation on MacOSX

  • A summarized instruction tested on macOSX 10.13 installing Ruby 2.4.1.

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
  • brew unlink imagemagick
  • brew install imagemagick@6 && brew link imagemagick@6 --force
  • 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 2.4.1

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 2.4.1@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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment