Rails ต้องการ Rubygems แต่ฉันมีพลอย


1

อัปเดต:ฉันสังเกตเห็นwhich rubyและwhereis rubyรายงานตำแหน่งที่ต่างกัน:

which ruby
/opt/local/bin/ruby
whereis ruby
/usr/bin/ruby

ฉันเพิ่งอัพเกรดทับทิมเป็นruby 1.8.7 (2009-06-12 patchlevel 174) [i686-darwin10]และฉันคิดว่าฉันทำลายรางรถไฟ เมื่อฉันพยายามโหลดราง ฉันได้รับข้อความแปลก ๆ :

$ ruby ​​สคริปต์ / เซิร์ฟเวอร์
Rails ต้องใช้ RubyGems> = 1.3.2 โปรดติดตั้ง RubyGems แล้วลองอีกครั้ง: http://rubygems.rubyforge.org

มีความคิดอะไรผิดหรือเปล่า?

$ rails -v
Rails 3.0.0.beta
$ gem -v
1.3.6
$ which gem
/usr/bin/gem
$ whereis gem
/usr/bin/gem
$ which rails
/usr/bin/rails
$ whereis rails
/usr/bin/rails
$ /usr/bin/gem -v
1.3.6
$ /usr/bin/rails -v
Rails 3.0.0.beta
$ ruby script/console

Rails requires RubyGems >= 1.3.2. Please install RubyGems and try again: http://rubygems.rubyforge.org
$ gem list rails

*** LOCAL GEMS ***

rails (3.0.0.beta, 2.3.5, 2.2.2, 1.2.6)

$ gem list 

*** LOCAL GEMS ***

abstract (1.0.0)
actionmailer (3.0.0.beta, 2.3.5, 2.2.2, 1.3.6)
actionpack (3.0.0.beta, 2.3.5, 2.2.2, 1.13.6)
actionwebservice (1.2.6)
activemerchant (1.4.1)
activemodel (3.0.0.beta)
activerecord (3.0.0.beta, 2.3.5, 2.2.2, 1.15.6)
activerecord-tableless (0.1.0)
activeresource (3.0.0.beta, 2.3.5, 2.2.2)
activesupport (3.0.0.beta, 2.3.5, 2.2.2, 1.4.4)
acts_as_ferret (0.4.3)
arel (0.2.pre)
authlogic (2.1.3)
builder (2.1.2)
bundler (0.9.3)
calendar_date_select (1.15)
capistrano (2.5.2)
cgi_multipart_eof_fix (2.5.0)
chronic (0.2.3)
columnize (0.3.1)
compass (0.8.17)
daemons (1.0.10)
dnssd (0.6.0)
erubis (2.6.5)
fastercsv (1.5.0)
fastthread (1.0.1)
fcgi (0.8.7)
ferret (0.11.6)
flay (1.4.0)
flog (2.4.0)
gbarcode (0.98.16)
gem_plugin (0.2.3)
git (1.2.5)
haml (2.2.15)
haml-edge (2.3.100)
highline (1.5.0)
hoe (2.4.0)
hpricot (0.6.164)
i18n (0.3.3)
javan-whenever (0.3.7)
jeweler (1.4.0)
jscruggs-metric_fu (1.1.5)
json_pure (1.2.0)
libxml-ruby (1.1.2)
linecache (0.43)
mail (2.1.2)
mechanize (0.9.3)
memcache-client (1.7.8)
mime-types (1.16)
mislav-will_paginate (2.3.11)
mocha (0.9.7)
mojombo-chronic (0.3.0)
mongrel (1.1.5)
needle (1.3.0)
net-scp (1.0.1)
net-sftp (2.0.1, 1.1.1)
net-ssh (2.0.4, 1.1.4)
net-ssh-gateway (1.0.0)
nifty-generators (0.3.0)
nokogiri (1.4.0)
openrain-action_mailer_tls (1.1.3)
passenger (2.2.5)
polyglot (0.2.9)
prawn (0.6.3)
prawn-core (0.6.3)
prawn-format (0.2.3)
prawn-layout (0.3.2)
prawn-security (0.1.1)
rack (1.1.0, 1.0.1)
rack-mount (0.4.5)
rack-test (0.5.3)
rails (3.0.0.beta, 2.3.5, 2.2.2, 1.2.6)
railties (3.0.0.beta)
rake (0.8.7, 0.8.3)
rake-compiler (0.6.0)
RedCloth (4.1.1)
reek (1.2.6)
relevance-rcov (0.9.2.1)
rmagick (2.12.2)
roodi (2.1.0)
rsl-stringex (1.0.3)
rspec (1.2.9)
rspec-rails (1.2.9)
ruby-debug (0.10.3)
ruby-debug-base (0.10.3)
ruby-openid (2.1.2)
ruby-yadis (0.3.4)
ruby2ruby (1.2.4)
ruby_parser (2.0.4)
rubyforge (2.0.3)
rubygems-update (1.3.6, 1.3.5)
rubynode (0.1.5)
searchlogic (2.3.9)
sexp_processor (3.0.3)
spree (0.9.4)
sqlite3-ruby (1.2.5, 1.2.4)
termios (0.9.4)
test-unit (2.0.5)
text-format (1.0.0)
text-hyphen (1.0.0)
thor (0.13.0)
tlsmail (0.0.1)
topfunky-gruff (0.3.5)
treetop (1.4.3)
tzinfo (0.3.16)
xmpp4r (0.4)

คำตอบ:


1

Guys คำพูดที่ฉลาด หากคุณกำลังใช้ทับทิมบนลินุกซ์ใด ๆ / แม็เช่นสภาพแวดล้อมการใช้งาน RVM - https://rvm.beginrescueend.com/ มันจะช่วยคุณไม่ให้สิ้นหวัง


0

ฉันมีปัญหาที่คล้ายกัน ฉันได้ทำการอัพเดต Ruby ผ่าน Mac Ports แล้ว แต่ฉันควรจะทำการอัพเดต RubyGems ผ่านทาง Mac Port ด้วย

sudo port install rb-rubygems

แม้ว่าคำเตือนฉันต้องติดตั้งพลอยทั้งหมดหลังจากทำเช่นนี้

โดยการใช้ไซต์ของเรา หมายความว่าคุณได้อ่านและทำความเข้าใจนโยบายคุกกี้และนโยบายความเป็นส่วนตัวของเราแล้ว
Licensed under cc by-sa 3.0 with attribution required.