Ruby 'rails server' 问题
Ruby 'rails server' issue
每次我尝试 运行 'rails server'
时都会出错
[NOTE]
You may have encountered a bug in the Ruby interpreter or extension libraries.
Bug reports are welcome.
Don't forget to include the above Crash Report log file.
For details: http://www.ruby-lang.org/bugreport.html
Abort trap: 6
我已经尝试按照其他提示进行操作,例如捆绑安装和更新,但仍然存在同样的问题。尝试 rvm install 1.9.3 并得到:
Checking requirements for osx.
Installing requirements for osx.
Updating system.....
Installing required packages: gcc49.......
Error running 'requirements_osx_brew_libs_install gcc49',
showing last 15 lines of /Users/Quoc/.rvm/log/1457707600_ruby-1.9.3-p551/package_install_gcc49.log
++ case "" in
++ [[ -t 1 ]]
++ return 1
++ printf %b 'There were package installation errors, make sure to read the log.
Try `brew tap --repair` and make sure `brew doctor` looks reasonable.
Check Homebrew requirements https://github.com/Homebrew/homebrew/wiki/Installation\n'
There were package installation errors, make sure to read the log.
Try `brew tap --repair` and make sure `brew doctor` looks reasonable.
Check Homebrew requirements https://github.com/Homebrew/homebrew/wiki/Installation
++ case "$_system_version" in
++ return 1
Requirements installation failed with status: 1.
Brew 修复也没有用。
编辑:运行宁brew install gcc46 --env=std
的结果
==> make bootstrap
Last 15 lines from /Users/Quoc/Library/Logs/Homebrew/gcc46/02.make:
_lto_end_uncompression in libbackend.a(lto-compress.o)
"_inflateEnd", referenced from:
_lto_end_uncompression in libbackend.a(lto-compress.o)
"_inflateInit_", referenced from:
_lto_end_uncompression in libbackend.a(lto-compress.o)
"_zError", referenced from:
_lto_end_compression in libbackend.a(lto-compress.o)
_lto_end_uncompression in libbackend.a(lto-compress.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[3]: *** [cc1] Error 1
rm gcc.pod
make[2]: *** [all-stage1-gcc] Error 2
make[1]: *** [stage1-bubble] Error 2
make: *** [bootstrap] Error 2
你得手动安装这些依赖,试试
brew install automake
如果它给你的错误是缺少 link of automake 类似这样的东西
您必须 brew link autoconf
才能安装 automake
然后尝试这些命令
brew link --overwrite --dry-run autoconf
brew link --overwrite autoconf
brew install automake
它将安装 automake,然后您可以再次尝试安装 ruby。
如果它不起作用,您可以尝试另一种方法:
Sol2:
brew install gcc46 --env=std
brew install gcc; brew install gcc46 --cc=gcc-4.9
Manually build GCC 4.6 outside of Homebrew, using the same configure switches
你也可以试试这个:
$ brew install gcc
$ CC=/usr/local/bin/gcc-4.9 rvm install 1.9.1-p376 --enable-shared
每次我尝试 运行 'rails server'
时都会出错[NOTE]
You may have encountered a bug in the Ruby interpreter or extension libraries.
Bug reports are welcome.
Don't forget to include the above Crash Report log file.
For details: http://www.ruby-lang.org/bugreport.html
Abort trap: 6
我已经尝试按照其他提示进行操作,例如捆绑安装和更新,但仍然存在同样的问题。尝试 rvm install 1.9.3 并得到:
Checking requirements for osx.
Installing requirements for osx.
Updating system.....
Installing required packages: gcc49.......
Error running 'requirements_osx_brew_libs_install gcc49',
showing last 15 lines of /Users/Quoc/.rvm/log/1457707600_ruby-1.9.3-p551/package_install_gcc49.log
++ case "" in
++ [[ -t 1 ]]
++ return 1
++ printf %b 'There were package installation errors, make sure to read the log.
Try `brew tap --repair` and make sure `brew doctor` looks reasonable.
Check Homebrew requirements https://github.com/Homebrew/homebrew/wiki/Installation\n'
There were package installation errors, make sure to read the log.
Try `brew tap --repair` and make sure `brew doctor` looks reasonable.
Check Homebrew requirements https://github.com/Homebrew/homebrew/wiki/Installation
++ case "$_system_version" in
++ return 1
Requirements installation failed with status: 1.
Brew 修复也没有用。
编辑:运行宁brew install gcc46 --env=std
==> make bootstrap
Last 15 lines from /Users/Quoc/Library/Logs/Homebrew/gcc46/02.make:
_lto_end_uncompression in libbackend.a(lto-compress.o)
"_inflateEnd", referenced from:
_lto_end_uncompression in libbackend.a(lto-compress.o)
"_inflateInit_", referenced from:
_lto_end_uncompression in libbackend.a(lto-compress.o)
"_zError", referenced from:
_lto_end_compression in libbackend.a(lto-compress.o)
_lto_end_uncompression in libbackend.a(lto-compress.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[3]: *** [cc1] Error 1
rm gcc.pod
make[2]: *** [all-stage1-gcc] Error 2
make[1]: *** [stage1-bubble] Error 2
make: *** [bootstrap] Error 2
你得手动安装这些依赖,试试
brew install automake
如果它给你的错误是缺少 link of automake 类似这样的东西
您必须 brew link autoconf
才能安装 automake
然后尝试这些命令
brew link --overwrite --dry-run autoconf
brew link --overwrite autoconf
brew install automake
它将安装 automake,然后您可以再次尝试安装 ruby。
如果它不起作用,您可以尝试另一种方法:
Sol2:
brew install gcc46 --env=std
brew install gcc; brew install gcc46 --cc=gcc-4.9
Manually build GCC 4.6 outside of Homebrew, using the same configure switches
你也可以试试这个:
$ brew install gcc
$ CC=/usr/local/bin/gcc-4.9 rvm install 1.9.1-p376 --enable-shared