自作機のRailsを4.0にしたいので、QNAP側にredmineを移せないかを検討。
AppCenterをみるとRailsがあったので、インストール
-> /opt/binの配下に,ruby,gem,rakeはインストールされる
# ruby -v
ruby 1.9.1p243 (2009-07-16 revision 24175) [arm-linux-eabi]
# gem -v
1.3.1
さて、railsはどこに???
# gem install rails
/opt/lib/ruby/1.9.1/rubygems/digest/md5.rb:8:in `require': libcrypto.so.0.9.8: cannot open shared object file: No such file or directory - /opt/lib/ruby/1.9.1/arm-linux-eabi/digest/md5.so (LoadError)
from /opt/lib/ruby/1.9.1/rubygems/digest/md5.rb:8:in `<top (required)>'
from /opt/lib/ruby/1.9.1/rubygems/package.rb:12:in `require'
from /opt/lib/ruby/1.9.1/rubygems/package.rb:12:in `<top (required)>'
from /opt/lib/ruby/1.9.1/rubygems/format.rb:9:in `require'
from /opt/lib/ruby/1.9.1/rubygems/format.rb:9:in `<top (required)>'
from /opt/lib/ruby/1.9.1/rubygems/installer.rb:11:in `require'
from /opt/lib/ruby/1.9.1/rubygems/installer.rb:11:in `<top (required)>'
from /opt/lib/ruby/1.9.1/rubygems/dependency_installer.rb:3:in `require'
from /opt/lib/ruby/1.9.1/rubygems/dependency_installer.rb:3:in `<top (required)>'
from /opt/lib/ruby/1.9.1/rubygems/commands/install_command.rb:4:in `require'
from /opt/lib/ruby/1.9.1/rubygems/commands/install_command.rb:4:in `<top (required)>'
from /opt/lib/ruby/1.9.1/rubygems/command_manager.rb:140:in `require'
from /opt/lib/ruby/1.9.1/rubygems/command_manager.rb:140:in `rescue in load_and_instantiate'
from /opt/lib/ruby/1.9.1/rubygems/command_manager.rb:132:in `load_and_instantiate'
from /opt/lib/ruby/1.9.1/rubygems/command_manager.rb:65:in `[]'
from /opt/lib/ruby/1.9.1/rubygems/command_manager.rb:118:in `find_command'
from /opt/lib/ruby/1.9.1/rubygems/command_manager.rb:104:in `process_args'
from /opt/lib/ruby/1.9.1/rubygems/command_manager.rb:75:in `run'
from /opt/lib/ruby/1.9.1/rubygems/gem_runner.rb:39:in `run'
from /opt/bin/gem:24:in `<main>'
とおこられるので、インストールに失敗している模様。
ここに解決策が書いてある。
が、
gem install openssl
だと、同じエラーが。これipkg install opensslじゃね?と思って実行。
# ipkg install openssl
Installing openssl (0.9.8v-2) to root...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/openssl_0.9.8v-2_arm.ipk
Configuring openssl
Successfully terminated.
やっぱりw
でもって、
# gem install rails --version "3.2.4"
・・・
なかなか応答がかえってこない(1時間くらい???)。で、結果が、、、
ERROR: Error installing rails:
bundler requires RubyGems version >= 1.3.6
Updating class cache with 0 classes...
ぐはっ。ではと、
# gem update --system
Updating RubyGems
Updating rubygems-update
Successfully installed rubygems-update-2.1.11
:0:Warning: Gem::SourceIndex#search support for String patterns is deprecated
Updating RubyGems to 2.1.11
Installing RubyGems 2.1.11
RubyGems 2.1.11 installed
Installing ri documentation for rubygems-2.1.11
/opt/lib/ruby/1.9.1/rdoc/rdoc.rb:275: warning: conflicting chdir during another chdir block
/opt/lib/ruby/1.9.1/rdoc/rdoc.rb:282: warning: conflicting chdir during another chdir block
=== 2.1.10 / 2013-10-24
・・・
If you do not wish to install this documentation in the future, use the
--no-document flag, or set it as the default in your ~/.gemrc file. See
'gem help env' for details.
# gem -v
2.1.11
とアップデート成功。ドキュメントのインストールなしでもよかったなと後で思う。
さて、再度railsを。
・・・
Building native extensions. This could take a while...
ERROR: Error installing rails:
ERROR: Failed to build gem native extension.
/opt/bin/ruby extconf.rb
creating Makefile
make
sh: make: command not found
なるほど。
ここを参考に必要そうなものをipkgでインストール。
# ipkg install make
Installing make (3.82-1) to root...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/make_3.82-1_arm.ipk
Configuring make
Successfully terminated.
# ipkg install gcc
Installing gcc (4.2.3-1) to root...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/gcc_4.2.3-1_arm.ipk
Installing binutils (2.19.1-1) to root...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/binutils_2.19.1-1_arm.ipk
Installing libc-dev (2.5-5) to root...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/libc-dev_2.5-5_arm.ipk
Installing libnsl (2.5-4) to root...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/libnsl_2.5-4_arm.ipk
Configuring binutils
update-alternatives: Linking //opt/bin/strings to /opt/bin/binutils-strings
Configuring gcc
Configuring libc-dev
Configuring libnsl
Successfully terminated.
以下の2つは必要かは不明
# ipkg install gawk
Installing gawk (4.0.1-1) to root...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/gawk_4.0.1-1_arm.ipk
Configuring gawk
update-alternatives: Linking //opt/bin/awk to /opt/bin/gawk
Successfully terminated.
# ipkg install sed
Installing sed (4.2.2-1) to root...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/sed_4.2.2-1_arm.ipk
Configuring sed
update-alternatives: Linking //opt/bin/sed to /opt/bin/gnu-sed
Successfully terminated.
で、再度railsを。
ERROR: Error installing rails:
ERROR: Failed to build gem native extension.
/opt/bin/ruby extconf.rb
creating Makefile
make
/home/slug/optware/cs08q1armel/toolchain/arm-2008q1/bin/arm-none-linux-gnueabi-gcc -I. -I/opt/include/ruby-1.9.1/arm-linux-eabi -I/opt/include/ruby-1.9.1/ruby/backward -I/opt/include/ruby-1.9.1 -I. -DJSON_GENERATOR -O2 -pipe -I/home/slug/optware/cs08q1armel/staging/opt/include -D_FILE_OFFSET_BITS=64 -fPIC -O2 -g -Wall -Wno-parentheses -fPIC -O3 -Wall -O0 -ggdb -o generator.o -c generator.c
make: /home/slug/optware/cs08q1armel/toolchain/arm-2008q1/bin/arm-none-linux-gnueabi-gcc: Command not found
make: *** [generator.o] Error 127
Gem files will remain installed in /opt/lib/ruby/gems/1.9.1/gems/json-1.8.1 for inspection.
Results logged to /opt/lib/ruby/gems/1.9.1/gems/json-1.8.1/ext/json/ext/generator/gem_make.out
んー、makefileのパスがおかしい。。。
今夜はここまで。