在我说:“我已经尝试过所有事情”之前,我应该在这里发帖。所以,这是我的问题
我遇到了ruby 1.9.3-p194
的问题。我的终端卡在涉及ruby或rails的每个(!)命令上。 (例如rails s mongrel
或甚至rails -v
和ruby -v
)
一切都始于这个奇怪的事情:
$ rvm use 1.9.3-p194
Using /usr/local/rvm/gems/ruby-1.9.3-p194
$ bundle exec rails s mongrel
然后它被卡住了。 所以,我想知道我安装了哪些版本的ruby:
$ rvm list
rvm rubies
ruby-1.8.7-p370 [ i686 ]
# => - current
# =* - current && default
# * - default
咦?我使用的是未安装的ruby版本吗?
经过一些研究,许多建议是重新安装整个包。 所以,我试过了。
$ rvm uninstall 1.9.3-p194
Removing /usr/local/rvm/src/ruby-1.9.3-p194...
/usr/local/rvm/rubies/ruby-1.9.3-p194 has already been removed.
再次,只是为了确保..
$ rvm uninstall 1.9.3-p194
/usr/local/rvm/src/ruby-1.9.3-p194 has already been removed.
/usr/local/rvm/rubies/ruby-1.9.3-p194 has already been removed.
嗯,那看起来不错。 (除了第一次尝试已经删除了一半的事实......:|)$ rvm reinstall 1.9.3-p194
Removing /usr/local/rvm/src/ruby-1.9.3-p194...
/usr/local/rvm/rubies/ruby-1.9.3-p194 has already been removed.
No binary rubies available for: osx/10.8/x86_64/ruby-1.9.3-p194.
Continuing with compilation. Please read 'rvm mount' to get more information on binary rubies.
Installing Ruby from source to: /usr/local/rvm/rubies/ruby-1.9.3-p194, this may take a while depending on your cpu(s)...
ruby-1.9.3-p194 - #downloading ruby-1.9.3-p194, this may take a while depending on your connection...
ruby-1.9.3-p194 - #extracted to /usr/local/rvm/src/ruby-1.9.3-p194 (already extracted)
ruby-1.9.3-p194 - #autoreconf
Error running 'autoreconf', please read /usr/local/rvm/log/ruby-1.9.3-p194/autoreconf.log
Skipping configure step, 'configure' does not exist, did autoreconf not run successfully?
ruby-1.9.3-p194 - #compiling
Error running 'make', please read /usr/local/rvm/log/ruby-1.9.3-p194/make.log
There has been an error while running make. Halting the installation.
下一步是:
$ rvm uninstall 1.9.3-p194
Removing /usr/local/rvm/src/ruby-1.9.3-p194...
/usr/local/rvm/rubies/ruby-1.9.3-p194 has already been removed.
Removing default ruby interpreter
$ rvm list
rvm rubies
# No rvm rubies installed yet. Try 'rvm help install'.
所以我检查了help install
,但没有找到任何可能有用的东西。至少,我还没有看到解决方案..
下一个:
$ rvm install 1.9.3-p194
No binary rubies available for: osx/10.8/x86_64/ruby-1.9.3-p194.
Continuing with compilation. Please read 'rvm mount' to get more information on binary rubies.
Installing Ruby from source to: /usr/local/rvm/rubies/ruby-1.9.3-p194, this may take a while depending on your cpu(s)...
ruby-1.9.3-p194 - #downloading ruby-1.9.3-p194, this may take a while depending on your connection...
ruby-1.9.3-p194 - #extracting ruby-1.9.3-p194 to /usr/local/rvm/src/ruby-1.9.3-p194
ruby-1.9.3-p194 - #extracted to /usr/local/rvm/src/ruby-1.9.3-p194
ruby-1.9.3-p194 - #configuring
Error running 'env LDFLAGS=-L/opt/sm/pkg/active/lib CFLAGS=-I/opt/sm/pkg/active/include CPATH=/opt/sm/pkg/active/include -L/usr/local/rvm/usr/lib ./configure --enable-shared --disable-install-doc --prefix=/usr/local/rvm/rubies/ruby-1.9.3-p194', please read /usr/local/rvm/log/ruby-1.9.3-p194/configure.log
There has been an error while running configure. Halting the installation.
现在,我想卸载rvm:
$ brew uninstall rvm
Error: No such keg: /usr/local/Cellar/rvm
好的..让我们检查它是否仍然有效......?
$ rvm
<listed standard output, thought that'd be useless here..>
是的,它仍在那里。让我们再试一次安装1.9.3 ..
$ rvm install 1.9.3
No binary rubies available for: osx/10.8/x86_64/ruby-1.9.3-p327.
Continuing with compilation. Please read 'rvm mount' to get more information on binary rubies.
Installing Ruby from source to: /usr/local/rvm/rubies/ruby-1.9.3-p327, this may take a while depending on your cpu(s)...
ruby-1.9.3-p327 - #downloading ruby-1.9.3-p327, this may take a while depending on your connection...
ruby-1.9.3-p327 - #extracting ruby-1.9.3-p327 to /usr/local/rvm/src/ruby-1.9.3-p327
ruby-1.9.3-p327 - #extracted to /usr/local/rvm/src/ruby-1.9.3-p327
ruby-1.9.3-p327 - #configuring
Error running 'env LDFLAGS=-L/opt/sm/pkg/active/lib CFLAGS=-I/opt/sm/pkg/active/include CPATH=/opt/sm/pkg/active/include -L/usr/local/rvm/usr/lib ./configure --enable-shared --disable-install-doc --prefix=/usr/local/rvm/rubies/ruby-1.9.3-p327', please read /usr/local/rvm/log/ruby-1.9.3-p327/configure.log
There has been an error while running configure. Halting the installation.
然后我找到了'解决方案......',#not ..
$ umask g+w
$ export -a rvm_configure_env
$ rvm_configure_env=('LDFLAGS=-L/opt/sm/pkg/active/lib' 'CFLAGS=-I/opt/sm/pkg/active/include' 'CPATH=/opt/sm/pkg/active/include')
没有成功.. 我试图再次安装1.9.3,这又引发了错误#2
我想是的。让我们整个崩溃..(读作可能的解决方案)
$ rvm implode
Are you SURE you wish for rvm to implode?
This will recursively remove /usr/local/rvm and other rvm traces?
(anything other than 'yes' will cancel) > yes
Removing rvm-shipped binaries (rvm-prompt, rvm, rvm-sudo rvm-shell and rvm-auto-ruby)
Removing rvm wrappers in /usr/local/rvm/bin
Hai! Removing /usr/local/rvm
rm: /etc/profile.d/rvm.sh: Permission denied
/usr/local/rvm has been removed.
rvm has been fully removed. Note you may need to manually remove /etc/rvmrc and ~/.rvmrc if they exist still.
哦.. Permission denied
很好......
$ sudo rvm implode
Password:
sudo: rvm: command not found
Hurrayy!它最终被删除了。
让我们重新安装..
$ gem install rvm
Successfully installed rvm-1.11.3.5
1 gem installed
Installing ri documentation for rvm-1.11.3.5...
Installing RDoc documentation for rvm-1.11.3.5...
什么?经过一次尝试?好的.. :) 但那...... ....
$ rvm install 1.9.3-p194
cat: /usr/local/rvm/VERSION: No such file or directory
-bash: /usr/local/rvm/scripts/base: No such file or directory
Unrecognized command line argument: 'impode' ( see: 'rvm usage' )
impode
..?点完?好吧,这可能来自早期的错字。
然后我尝试了一些其他命令一遍又一遍地返回相同的错误:
ifonteijne:dash Kers$ rvm install 1.9.3-p194 cat: /usr/local/rvm/VERSION: No such file or directory -bash: /usr/local/rvm/scripts/base: No such file or directory Unrecognized command line argument: 'imstall' ( see: 'rvm usage' ) ifonteijne:dash Kers$ rvm impode cat: /usr/local/rvm/VERSION: No such file or directory -bash: /usr/local/rvm/scripts/base: No such file or directory Unrecognized command line argument: 'impode' ( see: 'rvm usage' ) ifonteijne:dash Kers$ rvm implode cat: /usr/local/rvm/VERSION: No such file or directory -bash: /usr/local/rvm/scripts/base: No such file or directory Unrecognized command line argument: 'impode' ( see: 'rvm usage' ) ifonteijne:dash Kers$ rvm install cat: /usr/local/rvm/VERSION: No such file or directory -bash: /usr/local/rvm/scripts/base: No such file or directory Unrecognized command line argument: 'impode' ( see: 'rvm usage' )
现在我被卡住了......
如果有人可以帮助我,请。
我想安装:Ruby 1.9.3-p194
到RVM
==编辑== 尝试:
$ bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer )
# Kers,
#
# Thank you for using RVM!
# I sincerely hope that RVM helps to make your life easier and more enjoyable!!!
#
# ~Wayne
嗯,这很有效。
$ rvm install 1.9.3-p194
No binary rubies available for: osx/10.8/x86_64/ruby-1.9.3-p194.
Continuing with compilation. Please read 'rvm mount' to get more information on binary rubies.
You requested building with '/Developer/usr/bin/gcc' but it is not in your path.
$ brew install gcc
==> Installing gcc dependency: gmp
==> Downloading http://ftpmirror.gnu.org/gmp/gmp-5.0.5.tar.bz2
######################################################################## 100.0%
==> ./configure --prefix=/usr/local/Cellar/gmp/5.0.5 --enable-cxx --build=x86_64-apple-darwin
==> make
==> make check
==> make install
(...)
Xcode: 4.5.2 => /Volumes/SATA/Applications/Xcode.app/Contents/Developer
CLT: 1.0.0.9000000000.1.1249367152
Error: Homebrew doesn't know what compiler versions ship with your version of
Xcode. Please file an issue with the output of `brew --config`:
https://github.com/mxcl/homebrew/issues
Error: Failed executing: make (mpfr.rb:31)
正如所说:
$ brew --config
HOMEBREW_VERSION: 0.9.3
HEAD: 360be75b4c4e286365d71664d9a8ab277d7b1fb3
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
CPU: quad-core 64-bit arrandale
OS X: 10.8.2-x86_64
Xcode: 4.5.2 => /Volumes/SATA/Applications/Xcode.app/Contents/Developer
CLT: 1.0.0.9000000000.1.1249367152
GCC-4.2: build 5666
LLVM-GCC: build 2335
Clang: 2.1 build 163
X11: 2.7.3 => /opt/X11
System Ruby: 1.8.7-358
Perl: /usr/bin/perl
Python: /usr/bin/python
Ruby: /usr/bin/ruby => /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
希望这可能有所帮助。
答案 0 :(得分:1)
感谢rik.vanmechelen的评论。
结论:
$ ruby implode
注意:==> Make Bootstrap
需要(很长)时间。
$ curl -L get.rvm.io | bash -s stable --ruby
注意:这不是它的标准命令,我使用它是因为Xcode'命令行'错误。
$ brew install --use-llvm gcc
$ sudo gem install rails
然后我很高兴。
rik.vanmechelen,再次感谢。