Ruby-on-Rails をインストールしていましたが、Ruby のバージョンは 1.9.3 でした。Railsインストーラーでインストールしました。私は RoR を使い始めたばかりなので、最新バージョンから始めて Ruby on Rails チュートリアルを進めたいと思いました。Rails は簡単に更新できましたが、Ruby 自体はそうではありませんでした。
既存の RailsInstaller をアンインストールし、c:\Railsinstaller ディレクトリを削除して、RailsInstaller の最新バージョン、バージョン 3.0.0-alpha.1 をダウンロードしました。
インストール時に、コマンド プロンプト ウィンドウが起動し、git、ruby、および rails のインストール情報が一覧表示されます。代わりに、次のエラーが発生しました。
The system cannot find the path specified.
Rails Environment Configuration.
C:/RailsInstaller/scripts/config_check.rb:28:in ``': No such file or directory -
rails -v (Errno::ENOENT)
from C:/RailsInstaller/scripts/config_check.rb:28:in `run'
from C:/RailsInstaller/scripts/config_check.rb:83:in `<main>'
C:\Sites>
行 28 は、このブロックの一部です。
def run(command)
$stderr.puts "Running #{command}" if Config[:debug]
%x{#{command}}.chomp
end
83行目は、「puts」ブロックの内側です。
version: #{run "rails -v"}
「rails -v」を手動で実行する
C:\Sites>rails -v
'rails' is not recognized as an internal or external command,
operable program or batch file.
「ruby rails.rb」を試行しています ruby: そのようなファイルまたはディレクトリはありません -- rails.rb (LoadError)
Rails gem を手動でインストールしようとしています
c:\Sites>gem install rails --version 4.0.0
Fetching: i18n-0.6.4.gem (100%)
Successfully installed i18n-0.6.4
Fetching: atomic-1.1.10.gem (100%)
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
The system cannot find the path specified.
ERROR: Error installing rails:
ERROR: Failed to build gem native extension.
C:/RailsInstaller/Ruby2.0.0/bin/ruby.exe extconf.rb
creating Makefile
Gem files will remain installed in C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0
.0/gems/atomic-1.1.10 for inspection.
Results logged to C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/atomic-1.
1.10/ext/gem_make.out
gem_make.out には以下のみが含まれます。
C:/RailsInstaller/Ruby2.0.0/bin/ruby.exe extconf.rb
creating Makefile
テストのために Windows XP マシンに Railsinstaller 3.0.0 をインストールしようとしましたが、インストール後に同じエラーが発生しました。働きました。
新しいインストールが正常に機能するのを妨げている何かが以前のインストールから残っていましたか?
何かがまだ Ruby1.9.3 の forlder および/またはサブフォルダーにアクセスしようとして失敗していると思いますが、そのディレクトリを参照するものが見つかりません。