use*_*621 11 ruby ruby-on-rails
如果我跑rails s,我得到:
/Users/adam/.rvm/gems/ruby-1.9.3-p327/gems/pg-0.13.2/lib/pg_ext.bundle: [BUG] Segmentation fault
ruby 1.8.7 (2012-02-08 patchlevel 358) [universal-darwin12.0]
Abort trap: 6
Run Code Online (Sandbox Code Playgroud)
版本:
rails -v
Rails 3.2.1
ruby -v
ruby 1.9.3p327 (2012-11-10 revision 37606) [x86_64-darwin12.2.0]
Run Code Online (Sandbox Code Playgroud)
如果我使用1.9.3,为什么在错误消息中提到了ruby版本1.8.7?
小智 3
我遇到了类似的问题,运行任何命令都会bundle exec出现分段错误:
~/mayapp >bundle exec rake -T
/Users/rogermarlow/.rvm/gems/ruby-1.9.3-p327/gems/mysql2-0.3.11/lib/mysql2/mysql2.bundle: [BUG] Segmentation fault
ruby 1.8.7 (2012-02-08 patchlevel 358) [universal-darwin11.0]
Abort trap: 6
Run Code Online (Sandbox Code Playgroud)
我遇到了两个问题(1)使用 1.9.3p327 而不是 1.9.3p125 和(2)GEM_HOME 环境变量指向现在不存在的目录。所以我的解决办法是:
~/myapp >rvm list
rvm rubies
=* ruby-1.9.3-p327 [ x86_64 ]
# => - current
# =* - current && default
# * - default
~/myapp >rvm install 1.9.3-p125
**snip**
~/myapp >rvm use 1.9.3-p125
Using /Users/rogermarlow/.rvm/gems/ruby-1.9.3-p125
Running /Users/rogermarlow/.rvm/hooks/after_use_maglev
~/myapp >echo $GEM_HOME
/Users/rogermarlow/.rvm/gems/ruby-1.9.3-p125
~/myapp ># you should check that the directory in $GEM_HOME exists, I had ...-p125@global which had been removed at some point
~/myapp >bundle install
**snip**
Run Code Online (Sandbox Code Playgroud)
现在尝试一下bundle exec分段错误......
~/myapp >bundle exec rake -T
rake about # List versions of all Rails frameworks and the environment
rake assets:clean # Remove compiled assets
rake assets:precompile # Compile all the assets named in config.assets.precompile
**snip**
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
7758 次 |
| 最近记录: |