【インターン日記】1日目
会社のおはなしと環境構築でした!
私が借り受けたPCはたまたま、予めほとんどの環境が構築済みだったのでありがたかったです…。
gemのアップデートとrailsのアップデートを行ないました。
RoRの環境構築メモです。
C:\Documents and Settings\sea_mountain>rails --version Rails 2.1.0
最新版にしましょう。
C:\Documents and Settings\sea_mountain>gem install rails --include-dependencies INFO: `gem install -y` is now default and will be removed INFO: use --ignore-dependencies to install only the gems you list ERROR: Error installing rails: actionpack requires rack (~> 1.1.0, runtime)
gemをアップデートさせないといけない感じ‥
参考サイト(http://www.gfd-dennou.org/arch/davis/gfdnavi/doc/install/install-rails.htm)
C:\Documents and Settings\sea_mountain>gem update Updating installed gems ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError) bad response Moved Permanently 301 (http://gems.rubyforge.org/latest_specs.4 .8)
確認
C:\Documents and Settings\sea_mountain>gem --version 1.2.0
ソースを取ってくる先を確認します。
C:\Documents and Settings\sea_mountain>gem sources *** CURRENT SOURCES *** http://gems.rubyforge.org/
登録されているアドレスを-rで削除したりしたのですが、結局
C:\Documents and Settings\sea_mountain>gem sources -a http://rubygems.org/ http://rubygems.org/ added to sources
C:\Documents and Settings\sea_mountain>gem sources *** CURRENT SOURCES *** http://rubygems.org/
C:\Documents and Settings\sea_mountain>gem update --system Updating RubyGems Updating rubygems-update Successfully installed rubygems-update-1.3.7 ERROR: While executing gem ... (NameError) undefined local variable or method `remote_gemspecs' for #<Gem::Commands::Up dateCommand:0x34e78cc>
変なエラーが出る…
C:\Documents and Settings\sea_mountain>gem install rubygems-update ERROR: could not find gem rubygems-update locally or in a repository
やっぱり変なエラーが出る…
C:\Documents and Settings\sea_mountain>gem update Updating installed gems ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError) bad response Found 302 (http://rubygems.org/latest_specs.4.8)
もういちどlist表示してみると…
C:\Documents and Settings\sea_mountain>gem list *** LOCAL GEMS *** ※省略 rubygems-update (1.3.7, 1.2.0, 1.1.1, 1.0.1) ※省略
C:\Documents and Settings\sea_mountain>gem --version 1.2.0
あれ?しかし、2つ上のgem listでは1.3.7が入っている!
ダウンロードは出来てたようです。
ので、以下のコマンドでインストールします。
C:\Documents and Settings\sea_mountain>update_rubygems ・ソ=== 1.3.7 / 2010-05-13 NOTE: http://rubygems.org is now the default source for downloading gems. You may have sources set via ~/.gemrc, so you should replace http://gems.rubyforge.org with http://rubygems.org http://gems.rubyforge.org will continue to work for the forseeable future. New features: * `gem` commands * `gem install` and `gem fetch` now report alternate platforms when a matching one couldn't be found. * `gem contents` --prefix is now the default as specified in --help. Bug #27211 by Mamoru Tasaka. * `gem fetch` can fetch of old versions again. Bug #27960 by Eric Hankins. * `gem query` and friends output now lists platforms. Bug #27856 by Greg Hazel. * `gem server` now allows specification of multiple gem dirs for documentation. Bug #27573 by Yuki Sonoda. * `gem unpack` can unpack gems again. Bug #27872 by Timothy Jones. * `gem unpack` now unpacks remote gems. * --user-install is no longer the default. If you really liked it, see Gem::ConfigFile to learn how to set it by default. (This change was made in 1.3.6) * RubyGems now has platform support for IronRuby. Patch #27951 by Will Green. Bug fixes: * Require rubygems/custom_require if --disable-gem was set. Bug #27700 by Roger Pack. * RubyGems now protects against exceptions being raised by plugins. * rubygems/builder now requires user_interaction. Ruby Bug #1040 by Phillip Toland. * Gem::Dependency support #version_requirements= with a warning. Fix for old Rails versions. Bug #27868 by Wei Jen Lu. * Gem::PackageTask depends on the package dir like the other rake package tasks so dependencies can be hooked up correctly. ------------------------------------------------------------------------------ RubyGems installed the following executables: c:/ruby/bin/gem
どうやらできたっぽい…?
C:\Documents and Settings\sea_mountain>gem install rails --include-dependencies INFO: `gem install -y` is now default and will be removed INFO: use --ignore-dependencies to install only the gems you list Successfully installed rack-1.1.0 Successfully installed actionpack-2.3.8 Successfully installed actionmailer-2.3.8 Successfully installed activeresource-2.3.8 Successfully installed rails-2.3.8 5 gems installed Installing ri documentation for rack-1.1.0... Installing ri documentation for actionpack-2.3.8... Installing ri documentation for actionmailer-2.3.8... Installing ri documentation for activeresource-2.3.8... Installing ri documentation for rails-2.3.8... Installing RDoc documentation for rack-1.1.0... Installing RDoc documentation for actionpack-2.3.8... Installing RDoc documentation for actionmailer-2.3.8... Installing RDoc documentation for activeresource-2.3.8... Installing RDoc documentation for rails-2.3.8...
C:\Documents and Settings\sea_mountain>rails --version Rails 2.3.8
はいったみたい^^ノ