[rails] 本買った
最新 LL フレームワークエクスプローラ、衝動買い。
gem 使ってツールをインストールする環境を試したかったり、svn で最新の rails をインストールしてたりするので、自宅マシンの空きパーティションに chroot な環境を構築。直前エントリで試してるんですが、環境構築が簡単スギ。(って微妙な落し穴がありそうで怖いんですが
手順前後しつつ、chroot なナニを作成したんですが、aptitude upgrade だの dist-upgrade だのを実行中に以下のようなメセジが出力される事に気づく。
perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = (unset), LC_ALL = (unset), LANG = "ja_JP.eucJP" are supported and installed on your system. perl: warning: Falling back to the standard locale ("C"). locale: Cannot set LC_CTYPE to default locale: No such file or directory locale: Cannot set LC_MESSAGES to default locale: No such file or directory locale: Cannot set LC_ALL to default locale: No such file or directory
むむ。locales パケジが入っていない。(謎
locales 入れたら base-config remove されたが大丈夫か??とりあえず上記の症状は出なくなった模様だが ...
RubyGems 入れてみる
とりあえず、ファイルを download しろってコトなので取得。
# cd /root # wget http://rubyforge.org/frs/download.php/11289/rubygems-0.9.0.tgz
持ってこれたら解凍ッスか。
# tar zxvf rubygems-0.9.0.tgz (出力は略) #
解凍したら以下のような感じでした。
# cd rubygems-0.9.0 # ls ChangeLog Releases doc lib redist test README TODO examples pkgs scripts Rakefile bin gemspecs post-install.rb setup.rb #
では、setup.rb を実行しなさい、との事ですので、
# ruby setup.rb ---> bin <--- bin ---> lib ---> lib/rbconfig <--- lib/rbconfig ---> lib/rubygems <--- lib/rubygems <--- lib ---> bin <--- bin ---> lib ---> lib/rbconfig <--- lib/rbconfig ---> lib/rubygems <--- lib/rubygems <--- lib rm -f InstalledFiles ---> bin mkdir -p /usr/bin/ install gem /usr/bin/ install gem_mirror /usr/bin/ install gem_server /usr/bin/ install gemlock /usr/bin/ install gemri /usr/bin/ install gemwhich /usr/bin/ install index_gem_repository.rb /usr/bin/ install update_rubygems /usr/bin/ <--- bin ---> lib mkdir -p /usr/local/lib/site_ruby/1.8/ install gemconfigure.rb /usr/local/lib/site_ruby/1.8/ install rubygems.rb /usr/local/lib/site_ruby/1.8/ install ubygems.rb /usr/local/lib/site_ruby/1.8/ ---> lib/rbconfig mkdir -p /usr/local/lib/site_ruby/1.8/rbconfig install datadir.rb /usr/local/lib/site_ruby/1.8/rbconfig <--- lib/rbconfig ---> lib/rubygems mkdir -p /usr/local/lib/site_ruby/1.8/rubygems install builder.rb /usr/local/lib/site_ruby/1.8/rubygems install cmd_manager.rb /usr/local/lib/site_ruby/1.8/rubygems install command.rb /usr/local/lib/site_ruby/1.8/rubygems install config_file.rb /usr/local/lib/site_ruby/1.8/rubygems install custom_require.rb /usr/local/lib/site_ruby/1.8/rubygems install dependency_list.rb /usr/local/lib/site_ruby/1.8/rubygems install doc_manager.rb /usr/local/lib/site_ruby/1.8/rubygems install format.rb /usr/local/lib/site_ruby/1.8/rubygems install gem_commands.rb /usr/local/lib/site_ruby/1.8/rubygems install gem_openssl.rb /usr/local/lib/site_ruby/1.8/rubygems install gem_runner.rb /usr/local/lib/site_ruby/1.8/rubygems install incremental_fetcher.rb /usr/local/lib/site_ruby/1.8/rubygems install installer.rb /usr/local/lib/site_ruby/1.8/rubygems install loadpath_manager.rb /usr/local/lib/site_ruby/1.8/rubygems install old_format.rb /usr/local/lib/site_ruby/1.8/rubygems install open-uri.rb /usr/local/lib/site_ruby/1.8/rubygems install package.rb /usr/local/lib/site_ruby/1.8/rubygems install remote_installer.rb /usr/local/lib/site_ruby/1.8/rubygems install rubygems_version.rb /usr/local/lib/site_ruby/1.8/rubygems install security.rb /usr/local/lib/site_ruby/1.8/rubygems install source_index.rb /usr/local/lib/site_ruby/1.8/rubygems install specification.rb /usr/local/lib/site_ruby/1.8/rubygems install timer.rb /usr/local/lib/site_ruby/1.8/rubygems install user_interaction.rb /usr/local/lib/site_ruby/1.8/rubygems install validator.rb /usr/local/lib/site_ruby/1.8/rubygems install version.rb /usr/local/lib/site_ruby/1.8/rubygems <--- lib/rubygems <--- lib As of RubyGems 0.8.0, library stubs are no longer needed. Searching $LOAD_PATH for stubs to optionally delete (may take a while)... ...done. No library stubs found. Successfully built RubyGem Name: sources Version: 0.0.1 File: sources-0.0.1.gem #
むむ。/usr/bin に入ってるクサいなぁ。見てみる。
# which gem /usr/bin/gem #
debian 的には微妙だろうな。setup.rb なオプションがあるんだろうか。ま、いいや。rails 入れてみマース。(わくわく
# gem install rails --remote --include-dependencies Bulk updating Gem source index for: http://gems.rubyforge.org Successfully installed rails-1.1.4 Successfully installed rake-0.7.1 Successfully installed activesupport-1.3.1 Successfully installed activerecord-1.14.3 Successfully installed actionpack-1.12.3 Successfully installed actionmailer-1.2.3 Successfully installed actionwebservice-1.1.4 /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require': no such file to load -- rdoc/rdoc (LoadError) from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' from /usr/local/lib/site_ruby/1.8/rubygems/doc_manager.rb:71:in `load_rdoc' from /usr/local/lib/site_ruby/1.8/rubygems/doc_manager.rb:41:in `generate_ri' from /usr/local/lib/site_ruby/1.8/rubygems/gem_commands.rb:283:in `execute' from /usr/local/lib/site_ruby/1.8/rubygems/gem_commands.rb:282:in `execute' from /usr/local/lib/site_ruby/1.8/rubygems/gem_commands.rb:220:in `execute' from /usr/local/lib/site_ruby/1.8/rubygems/command.rb:69:in `invoke' from /usr/local/lib/site_ruby/1.8/rubygems/cmd_manager.rb:117:in `process_args' from /usr/local/lib/site_ruby/1.8/rubygems/cmd_manager.rb:88:in `run' from /usr/local/lib/site_ruby/1.8/rubygems/gem_runner.rb:29:in `run' from /usr/bin/gem:23 #
む、rdoc? 入ってないんかな? てコトで入れてみた。てか、入ってなかた。でリトライ。
# aptitude install -fy rdoc (出力略) # gem install rails --remote --include-dependencies Successfully installed rails-1.1.4 #
との事でヨカタ、のかな?チェキ入れてみると、rails も /usr/bin に入ってるようです。ruby 関連でポイント高いパケジが install されてない可能性は高いな。
chroot 環境関連で追記
dist-upgrade したらいくつかの daemon が再起動したんですが、親側の端末で ps aux してみたら、何点かのアレが再起動されている模様。再起動されている daemon は以下の模様。
root 14361 0.0 0.2 2132 568 ? Ss 18:20 0:00 /usr/sbin/cron root 14545 0.0 0.1 1508 336 ? Ss 18:20 0:00 /usr/sbin/inetd gdm 14661 0.0 0.2 5380 548 ? Ss 18:20 0:00 /usr/sbin/exim4 -bd -q30m daemon 18418 0.0 0.1 1772 444 ? Ss 18:20 0:00 /usr/sbin/atd root 18517 0.0 0.1 1520 344 ? Ss 18:20 0:00 /sbin/klogd -x root 18565 0.0 0.2 1580 548 ? Ss 18:20 0:00 /sbin/syslogd
うーむ。とりあえずこの環境でサンプルを写経してみようか。