さっそく、システムにrvmでrubyを入れてみる。
最終的には、apache + passenger、あとDBはpostgresでredmineあたりを用意してみようと思う。
~# curl -L https://get.rvm.io | bash -s stable
・・・
Creating group 'rvm'
Installing RVM to /usr/local/rvm/
Installation of RVM in /usr/local/rvm/ is almost complete:
* First you need to add all users that will be using rvm to 'rvm' group,
and logout - login again, anyone using rvm will be operating with `umask u=rwx,g=rwx,o=rx`.
* To start using RVM you need to run `source /etc/profile.d/rvm.sh`
in all your open shell windows, in rare cases you need to reopen all shell windows.
# Administrator,
#
# Thank you for using RVM!
# We sincerely hope that RVM helps to make your life easier and more enjoyable!!!
#
# ~Wayne, Michal & team.
In case of problems: http://rvm.io/help
Help RVM 2.0: https://www.bountysource.com/fundraisers/489-rvm-2-0
ふむふむ。/usr/local/rvm/にインストールされた模様。
/etc/groupを見るとrvmグループも追加されているので、ここに使用するユーザを追加するのね。
さて、この後はどうするか。。。と、先駆者の方の情報を探す。
ここを参考にさせていただこう。
これまでのアカウントではすでにrvmをローカルに入れてたので、rvmを使うとそっちを向いてしまってるみたい。
.bashrcとかから該当しそうなコードをコメントアウトしたのだが、うまくいかない。
なので新しいアカウントを作成。参考元では、.bash_profieに以下を記入しないと動かないと書いてたのですが、書かなくても動作しました。rvmが新しいからかな?
[[ -s "/usr/local/rvm/scripts/rvm" ]] && . "/usr/local/rvm/scripts/rvm" # Load RVM function
~$ rvmsudo gem install rails
Warning: can not check `/etc/sudoers` for `secure_path`, falling back to call via `/usr/bin/env`, this breaks rules from `/etc/sudoers`. Run:
export rvmsudo_secure_path=1
to avoid the warning, put it in shell initialization file to make it persistent.
In case there is no `secure_path` in `/etc/sudoers`. Run:
export rvmsudo_secure_path=0
to avoid the warning, put it in shell initialization file to make it persistent
なにやらメッセージが出てきたので、対応しておく。
~$ rvmsudo gem install rails
Fetching: i18n-0.6.5.gem (100%)
Fetching: multi_json-1.8.2.gem (100%)
Fetching: tzinfo-0.3.38.gem (100%)
Fetching: minitest-4.7.5.gem (100%)
Fetching: atomic-1.1.14.gem (100%)
Building native extensions. This could take a while...
Fetching: thread_safe-0.1.3.gem (100%)
Fetching: activesupport-4.0.0.gem (100%)
Fetching: builder-3.1.4.gem (100%)
Fetching: rack-1.5.2.gem (100%)
Fetching: rack-test-0.6.2.gem (100%)
Fetching: erubis-2.7.0.gem (100%)
Fetching: actionpack-4.0.0.gem (100%)
Fetching: activemodel-4.0.0.gem (100%)
Fetching: arel-4.0.1.gem (100%)
Fetching: activerecord-deprecated_finders-1.0.3.gem (100%)
Fetching: activerecord-4.0.0.gem (100%)
Fetching: mime-types-1.25.gem (100%)
Fetching: polyglot-0.3.3.gem (100%)
Fetching: treetop-1.4.15.gem (100%)
Fetching: mail-2.5.4.gem (100%)
Fetching: actionmailer-4.0.0.gem (100%)
Fetching: thor-0.18.1.gem (100%)
Fetching: railties-4.0.0.gem (100%)
Fetching: hike-1.2.3.gem (100%)
Fetching: tilt-1.4.1.gem (100%)
Fetching: sprockets-2.10.0.gem (100%)
Fetching: sprockets-rails-2.0.1.gem (100%)
Fetching: rails-4.0.0.gem (100%)
Successfully installed i18n-0.6.5
Successfully installed multi_json-1.8.2
Successfully installed tzinfo-0.3.38
Successfully installed minitest-4.7.5
Successfully installed atomic-1.1.14
Successfully installed thread_safe-0.1.3
Successfully installed activesupport-4.0.0
Successfully installed builder-3.1.4
Successfully installed rack-1.5.2
Successfully installed rack-test-0.6.2
Successfully installed erubis-2.7.0
Successfully installed actionpack-4.0.0
Successfully installed activemodel-4.0.0
Successfully installed arel-4.0.1
Successfully installed activerecord-deprecated_finders-1.0.3
Successfully installed activerecord-4.0.0
Successfully installed mime-types-1.25
Successfully installed polyglot-0.3.3
Successfully installed treetop-1.4.15
Successfully installed mail-2.5.4
Successfully installed actionmailer-4.0.0
Successfully installed thor-0.18.1
Successfully installed railties-4.0.0
Successfully installed hike-1.2.3
Successfully installed tilt-1.4.1
Successfully installed sprockets-2.10.0
Successfully installed sprockets-rails-2.0.1
Successfully installed rails-4.0.0
28 gems installed
Installing ri documentation for i18n-0.6.5...
Installing ri documentation for multi_json-1.8.2...
Installing ri documentation for tzinfo-0.3.38...
Installing ri documentation for minitest-4.7.5...
Installing ri documentation for atomic-1.1.14...
Installing ri documentation for thread_safe-0.1.3...
Installing ri documentation for activesupport-4.0.0...
Installing ri documentation for builder-3.1.4...
Installing ri documentation for rack-1.5.2...
Installing ri documentation for rack-test-0.6.2...
Installing ri documentation for erubis-2.7.0...
Installing ri documentation for actionpack-4.0.0...
Installing ri documentation for activemodel-4.0.0...
Installing ri documentation for arel-4.0.1...
Installing ri documentation for activerecord-deprecated_finders-1.0.3...
Installing ri documentation for activerecord-4.0.0...
Installing ri documentation for mime-types-1.25...
Installing ri documentation for polyglot-0.3.3...
Installing ri documentation for treetop-1.4.15...
Installing ri documentation for mail-2.5.4...
Installing ri documentation for actionmailer-4.0.0...
Installing ri documentation for thor-0.18.1...
Installing ri documentation for railties-4.0.0...
Installing ri documentation for hike-1.2.3...
Installing ri documentation for tilt-1.4.1...
Installing ri documentation for sprockets-2.10.0...
Installing ri documentation for sprockets-rails-2.0.1...
Installing ri documentation for rails-4.0.0...
file 'lib' not found
Installing RDoc documentation for i18n-0.6.5...
Installing RDoc documentation for multi_json-1.8.2...
Installing RDoc documentation for tzinfo-0.3.38...
Installing RDoc documentation for minitest-4.7.5...
Installing RDoc documentation for atomic-1.1.14...
Installing RDoc documentation for thread_safe-0.1.3...
Installing RDoc documentation for activesupport-4.0.0...
Installing RDoc documentation for builder-3.1.4...
Installing RDoc documentation for rack-1.5.2...
Installing RDoc documentation for rack-test-0.6.2...
Installing RDoc documentation for erubis-2.7.0...
Installing RDoc documentation for actionpack-4.0.0...
Installing RDoc documentation for activemodel-4.0.0...
Installing RDoc documentation for arel-4.0.1...
Installing RDoc documentation for activerecord-deprecated_finders-1.0.3...
Installing RDoc documentation for activerecord-4.0.0...
Installing RDoc documentation for mime-types-1.25...
Installing RDoc documentation for polyglot-0.3.3...
Installing RDoc documentation for treetop-1.4.15...
Installing RDoc documentation for mail-2.5.4...
Installing RDoc documentation for actionmailer-4.0.0...
Installing RDoc documentation for thor-0.18.1...
Installing RDoc documentation for railties-4.0.0...
Installing RDoc documentation for hike-1.2.3...
Installing RDoc documentation for tilt-1.4.1...
Installing RDoc documentation for sprockets-2.10.0...
Installing RDoc documentation for sprockets-rails-2.0.1...
Installing RDoc documentation for rails-4.0.0...
file 'lib' not found
で、ふと思う。4.0.0入れちゃダメじゃん。Redmineって対応してなかったような・・・。
今夜は遅いので、対応はまた次、
最終的には、apache + passenger、あとDBはpostgresでredmineあたりを用意してみようと思う。
~# curl -L https://get.rvm.io | bash -s stable
・・・
Creating group 'rvm'
Installing RVM to /usr/local/rvm/
Installation of RVM in /usr/local/rvm/ is almost complete:
* First you need to add all users that will be using rvm to 'rvm' group,
and logout - login again, anyone using rvm will be operating with `umask u=rwx,g=rwx,o=rx`.
* To start using RVM you need to run `source /etc/profile.d/rvm.sh`
in all your open shell windows, in rare cases you need to reopen all shell windows.
# Administrator,
#
# Thank you for using RVM!
# We sincerely hope that RVM helps to make your life easier and more enjoyable!!!
#
# ~Wayne, Michal & team.
In case of problems: http://rvm.io/help
Help RVM 2.0: https://www.bountysource.com/fundraisers/489-rvm-2-0
ふむふむ。/usr/local/rvm/にインストールされた模様。
/etc/groupを見るとrvmグループも追加されているので、ここに使用するユーザを追加するのね。
さて、この後はどうするか。。。と、先駆者の方の情報を探す。
ここを参考にさせていただこう。
これまでのアカウントではすでにrvmをローカルに入れてたので、rvmを使うとそっちを向いてしまってるみたい。
.bashrcとかから該当しそうなコードをコメントアウトしたのだが、うまくいかない。
なので新しいアカウントを作成。参考元では、.bash_profieに以下を記入しないと動かないと書いてたのですが、書かなくても動作しました。rvmが新しいからかな?
[[ -s "/usr/local/rvm/scripts/rvm" ]] && . "/usr/local/rvm/scripts/rvm" # Load RVM function
~$ rvmsudo gem install rails
Warning: can not check `/etc/sudoers` for `secure_path`, falling back to call via `/usr/bin/env`, this breaks rules from `/etc/sudoers`. Run:
export rvmsudo_secure_path=1
to avoid the warning, put it in shell initialization file to make it persistent.
In case there is no `secure_path` in `/etc/sudoers`. Run:
export rvmsudo_secure_path=0
to avoid the warning, put it in shell initialization file to make it persistent
なにやらメッセージが出てきたので、対応しておく。
~$ rvmsudo gem install rails
Fetching: i18n-0.6.5.gem (100%)
Fetching: multi_json-1.8.2.gem (100%)
Fetching: tzinfo-0.3.38.gem (100%)
Fetching: minitest-4.7.5.gem (100%)
Fetching: atomic-1.1.14.gem (100%)
Building native extensions. This could take a while...
Fetching: thread_safe-0.1.3.gem (100%)
Fetching: activesupport-4.0.0.gem (100%)
Fetching: builder-3.1.4.gem (100%)
Fetching: rack-1.5.2.gem (100%)
Fetching: rack-test-0.6.2.gem (100%)
Fetching: erubis-2.7.0.gem (100%)
Fetching: actionpack-4.0.0.gem (100%)
Fetching: activemodel-4.0.0.gem (100%)
Fetching: arel-4.0.1.gem (100%)
Fetching: activerecord-deprecated_finders-1.0.3.gem (100%)
Fetching: activerecord-4.0.0.gem (100%)
Fetching: mime-types-1.25.gem (100%)
Fetching: polyglot-0.3.3.gem (100%)
Fetching: treetop-1.4.15.gem (100%)
Fetching: mail-2.5.4.gem (100%)
Fetching: actionmailer-4.0.0.gem (100%)
Fetching: thor-0.18.1.gem (100%)
Fetching: railties-4.0.0.gem (100%)
Fetching: hike-1.2.3.gem (100%)
Fetching: tilt-1.4.1.gem (100%)
Fetching: sprockets-2.10.0.gem (100%)
Fetching: sprockets-rails-2.0.1.gem (100%)
Fetching: rails-4.0.0.gem (100%)
Successfully installed i18n-0.6.5
Successfully installed multi_json-1.8.2
Successfully installed tzinfo-0.3.38
Successfully installed minitest-4.7.5
Successfully installed atomic-1.1.14
Successfully installed thread_safe-0.1.3
Successfully installed activesupport-4.0.0
Successfully installed builder-3.1.4
Successfully installed rack-1.5.2
Successfully installed rack-test-0.6.2
Successfully installed erubis-2.7.0
Successfully installed actionpack-4.0.0
Successfully installed activemodel-4.0.0
Successfully installed arel-4.0.1
Successfully installed activerecord-deprecated_finders-1.0.3
Successfully installed activerecord-4.0.0
Successfully installed mime-types-1.25
Successfully installed polyglot-0.3.3
Successfully installed treetop-1.4.15
Successfully installed mail-2.5.4
Successfully installed actionmailer-4.0.0
Successfully installed thor-0.18.1
Successfully installed railties-4.0.0
Successfully installed hike-1.2.3
Successfully installed tilt-1.4.1
Successfully installed sprockets-2.10.0
Successfully installed sprockets-rails-2.0.1
Successfully installed rails-4.0.0
28 gems installed
Installing ri documentation for i18n-0.6.5...
Installing ri documentation for multi_json-1.8.2...
Installing ri documentation for tzinfo-0.3.38...
Installing ri documentation for minitest-4.7.5...
Installing ri documentation for atomic-1.1.14...
Installing ri documentation for thread_safe-0.1.3...
Installing ri documentation for activesupport-4.0.0...
Installing ri documentation for builder-3.1.4...
Installing ri documentation for rack-1.5.2...
Installing ri documentation for rack-test-0.6.2...
Installing ri documentation for erubis-2.7.0...
Installing ri documentation for actionpack-4.0.0...
Installing ri documentation for activemodel-4.0.0...
Installing ri documentation for arel-4.0.1...
Installing ri documentation for activerecord-deprecated_finders-1.0.3...
Installing ri documentation for activerecord-4.0.0...
Installing ri documentation for mime-types-1.25...
Installing ri documentation for polyglot-0.3.3...
Installing ri documentation for treetop-1.4.15...
Installing ri documentation for mail-2.5.4...
Installing ri documentation for actionmailer-4.0.0...
Installing ri documentation for thor-0.18.1...
Installing ri documentation for railties-4.0.0...
Installing ri documentation for hike-1.2.3...
Installing ri documentation for tilt-1.4.1...
Installing ri documentation for sprockets-2.10.0...
Installing ri documentation for sprockets-rails-2.0.1...
Installing ri documentation for rails-4.0.0...
file 'lib' not found
Installing RDoc documentation for i18n-0.6.5...
Installing RDoc documentation for multi_json-1.8.2...
Installing RDoc documentation for tzinfo-0.3.38...
Installing RDoc documentation for minitest-4.7.5...
Installing RDoc documentation for atomic-1.1.14...
Installing RDoc documentation for thread_safe-0.1.3...
Installing RDoc documentation for activesupport-4.0.0...
Installing RDoc documentation for builder-3.1.4...
Installing RDoc documentation for rack-1.5.2...
Installing RDoc documentation for rack-test-0.6.2...
Installing RDoc documentation for erubis-2.7.0...
Installing RDoc documentation for actionpack-4.0.0...
Installing RDoc documentation for activemodel-4.0.0...
Installing RDoc documentation for arel-4.0.1...
Installing RDoc documentation for activerecord-deprecated_finders-1.0.3...
Installing RDoc documentation for activerecord-4.0.0...
Installing RDoc documentation for mime-types-1.25...
Installing RDoc documentation for polyglot-0.3.3...
Installing RDoc documentation for treetop-1.4.15...
Installing RDoc documentation for mail-2.5.4...
Installing RDoc documentation for actionmailer-4.0.0...
Installing RDoc documentation for thor-0.18.1...
Installing RDoc documentation for railties-4.0.0...
Installing RDoc documentation for hike-1.2.3...
Installing RDoc documentation for tilt-1.4.1...
Installing RDoc documentation for sprockets-2.10.0...
Installing RDoc documentation for sprockets-rails-2.0.1...
Installing RDoc documentation for rails-4.0.0...
file 'lib' not found
で、ふと思う。4.0.0入れちゃダメじゃん。Redmineって対応してなかったような・・・。
今夜は遅いので、対応はまた次、