システム「Railsは、現在このシステムにインストールされていません」と言います。 5、Rails 4.1.0)、私はrvmを使ってインストールした後、古いバージョンのRubyに切り替えるので、デモアプリケーションを実行することができました。私は、デモアプリケーションを実行しているいくつかの問題を持っていたので、私は戻って私のメインのプロジェクトのアプリ(ルビー2.2.4、Railsの4.0.12)に行ってきました、rails s
を実行しようとなった:システムは
Rails is not currently installed on this system. To get the latest version, simply type:
$ sudo gem install rails
You can then rerun your "rails" command.
まあただ愚かだという。 Railsはちょうど一瞬前です。私は、Ruby 2.2.4でgemsetを交換しようとしましたが、その間にターミナルを閉じていましたが、それでもRailsはインストールされていませんでした。これらは私のgemsetsです:
gemsets for ruby-2.0.0-p481 (found in /Users/localflavor/.rvm/gems/ruby-2.0.0-p481)
=> (default)
global
gemsets for ruby-2.1.5 (found in /Users/localflavor/.rvm/gems/ruby-2.1.5)
=> (default)
global
gemsets for ruby-2.2.1 (found in /Users/localflavor/.rvm/gems/ruby-2.2.1)
=> (default)
global
gemsets for ruby-2.2.2 (found in /Users/localflavor/.rvm/gems/ruby-2.2.2)
=> (default)
global
gemsets for ruby-2.2.4 (found in /Users/localflavor/.rvm/gems/ruby-2.2.4)
=> (default)
global
gemsets for ruby-2.3.0 (found in /Users/localflavor/.rvm/gems/ruby-2.3.0)
=> (default)
global
宝石[email protected]に含ま:
$ gem list
*** LOCAL GEMS ***
bigdecimal (default: 1.2.6)
gem-wrappers (1.2.7)
io-console (default: 0.4.3)
json (default: 1.8.1)
minitest (5.4.3)
power_assert (0.2.2)
psych (default: 2.0.8)
rake (default: 10.4.2)
rdoc (default: 4.2.0)
rvm (1.11.3.9)
test-unit (3.0.8)
宝石はどこ、[email protected]
$ gem list
*** LOCAL GEMS ***
bigdecimal (default: 1.2.6)
gem-wrappers (1.2.7)
io-console (default: 0.4.3)
json (default: 1.8.1)
minitest (5.4.3)
power_assert (0.2.2)
psych (default: 2.0.8)
rake (default: 10.4.2)
rdoc (default: 4.2.0)
rvm (1.11.3.9)
test-unit (3.0.8)
Railsの中に含まあなたは?私はrvm get master
を試して、ruby 2.2.4、openssl、そしてbundlerを再インストールしました。私はthis SO questionから関連性があると思われるすべてのソリューションを試しました。このすべては役に立たない。
興味深いことに、Ruby(2.4.0)の最新バージョンをインストールすることもできません。
$ rvm install ruby 2.4.0
ruby-2.4.0 - #removing src/ruby-2.4.0..
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/10.9/x86_64/ruby-2.4.0.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for osx.
Certificates in '/usr/local/etc/openssl/cert.pem' are already up to date.
Requirements installation successful.
Installing Ruby from source to: /Users/localflavor/.rvm/rubies/ruby-2.4.0, this may take a while depending on your cpu(s)...
ruby-2.4.0 - #downloading ruby-2.4.0, this may take a while depending on your connection...
ruby-2.4.0 - #extracting ruby-2.4.0 to /Users/localflavor/.rvm/src/ruby-2.4.0....
ruby-2.4.0 - #configuring...................................................................
ruby-2.4.0 - #post-configuration.
ruby-2.4.0 - #compiling....................
Error running '__rvm_make -j 1',
showing last 15 lines of /Users/localflavor/.rvm/log/1487187741_ruby-2.4.0/make.log
configuring pty
configuring racc/cparse
configuring rbconfig/sizeof
configuring readline
configuring ripper
configuring rubyvm
configuring sdbm
configuring socket
configuring stringio
configuring strscan
configuring syslog
configuring zlib
exts.mk:1471: *** commands commence before first target. Stop.
make: *** [build-ext] Error 2
++ return 2
There has been an error while running make. Halting the installation.
私はRailsがここにあると仮定しているだけです。ちょうどバンドラーとopensslのように。何かが起きていて、どこを見るか分からない。どうすればそれを見つけ、それを元に戻すことができますか?
UPDATE
私のSSLの問題は依然として未解決あるが、私は再び起動Railsのを取得するには、この回避策を行うことができました(感謝Kevin-T!)
レールから行方不明になったので、両方のgemsets for ruby 2.2.4(宝石リストポインタのために7studに感謝)、私はそれを再インストールする必要がありました。非HTTPSソースを使用します。しかし、私はgem install rails -v 4.0.12
ERROR: While executing gem ... (Gem::Exception)
Unable to require openssl, install OpenSSL and rebuild ruby (preferred) or use non-HTTPS sources
を実行したときに、私はオプション2を選択しました。このエラーを取得しました。
https://rubygems.org is recommended for security over http://rubygems.org
Do you want to add this insecure source? [yn] y <-- I said yes
http://rubygems.org added to sources
私はそれがgem source
で追加されたことを確認:私はgem source --add http://rubygems.org
で新しいhttp
バージョンを追加しました
*** CURRENT SOURCES ***
https://rubygems.org/
:そのために、私は私のソースがhttps
であることを確認するためにgem source
を走った
*** CURRENT SOURCES ***
https://rubygems.org/
http://rubygems.org <-- the new one
https
を削除しました。gem source --remove https://rubygems.org/
:
https://rubygems.org/ removed from sources
この時点では、gem install rails -v 4.0.12
が動作しました。かさばるドキュメントなしでインストールするにはthis postをチェックしてください。
gpg2のヘッドアップに感謝します! @ Glyoko – richardson