2016年11月14日 星期一

[Redmine][Archlinux] How to install redmine by using sqlite into archlinux

INSTALL SQLITE
Download sqlite3
Precompiled Binaries for Linux [sqlite-tools-linux-x86-3150100.zip]

INSTALL RUBY
Download ruby-2.3.1(If this version can't compile, download latest one.)
./configure –prefix=/home/freeman/APP/RUBY
make
make install
export PATH=$PATH:/home/freeman/APP/RUBY/bin

INSTALL GEMS
Download rubygems-2.6.8
cd rubygems-2.6.8
export LC_ALL=en_US.UTF-8
ruby setup.rb

INSTALL RAILS
gem install rails

Install library for install
sudo pacman -S libmysqlclient pkg-config freetds imagemagick

INSTALL SQLITE3 GEM FOR RUBY
gem install sqlite3-ruby

INSTALL REDMINE
Download redmine-3.1.7.tar.gz
ln -s redmine-3.1.7 REDMINE

Install the dependencies specified in your Gemfile
cd REDMINE
bundle install

version:3.1.7 show picture properly.


Start to configure the environment settings.
cd REDMINE
CONFIGURE DATABASE
echo "production:" > config/database.yml &&\
echo " adapter: sqlite3" >> config/database.yml &&\
echo " database: db/redmine.sqlite3" >> config/database.yml

POPULATE DATABASE
cd REDMINE
rake db:migrate RAILS_ENV="production"
rake redmine:load_default_data RAILS_ENV="production"

Create secret_token
cd REDMINE
echo "production:" > config/secrets.yml
echo " secret_key_base: $(rake secret)" >> config/secrets.yml

START REDMINE
ruby bin/rails server -e production


Backup REDMINE
cp db/redmine.sqlite3 and file to another folder.

Other Work:

Reference:

Q:
Corrupted memory and Segfaults when compiling ruby version 2.3.x

A:
Please decompress tar ball again. And recompile package.
pacman -S gcc5
CC=/usr/bin/gcc-5

Q:
SystemStackError: stack level too deep

/home/happy/APP/RUBY/lib/ruby/gems/2.4.0/gems/activesupport-4.2.7.1/lib/active_support/core_ext/numeric/conversions.rb:124:in `block (2 levels) in <class:Numeric>'

A:
The version of Ruby
ruby 2.4.1p111
Rails version must more than 4.2.8.

cd REDMINE
Edit Gemfile

Alter rails version to 4.2.8 (The original version (4.2.7) is too old)
gem ‘rails’, ‘4.2.8’

Then:

bundle update

Ruby 2.4 and Rails 4 stack level too deep (SystemStackError)

0 意見:

張貼留言