红宝石 – 设置env,OSX rbenv和捆绑战
所以我刚刚从ubuntu交换到mac,设置env并没有像承诺那么容易.
这是我遵循的过程. >安装xcode – 然后进入prerences并下载命令行工具 i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00) Copyright (C) 2007 Free Software Foundation,Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. >然后安装homebrew $ruby?? -e“$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)” 你的系统已经准备好了. 安装git brew update brew install git 通过ssh将我的电脑连接到我的git帐户 安装Rbenv $brew update $brew install rbenv $brew install ruby-build 将eval“$(rbenv init – )”添加到我的.bash_profile文件中 >运行rbenv install -list查看我可以安装的所有版本,然后运行 $rbenv install 1.9.3-p327 $rbenv global 1.9.3-p327 (我应该rehashed rbenv但我忘了)然后我运行gem安装捆绑包 Gem::InstallError: better_errors requires Ruby version >= 1.9.2. An error occurred while installing better_errors (0.7.0),and Bundler cannot continue. Make sure that `gem install better_errors -v '0.7.0'` succeeds before bundling. 跑了ruby -v,看到它是1.8.7“球” – 我惊呼 >补救这个我做了以下rbenv rehash $which bundle /usr/bin/bundle $which gem /Users/fortknokx/.rbenv/shims/gem 所以这是现在我站起来困惑的地方.正如我所说,这是我第三天使用mac,我很了解理解$PATH,我相信我在某处犯规.任何建议我开放. ps这是我在.bash_profile中的 export PATH="/usr/local/bin:/usr/local/bin/sublime:~/bin:$PATH" eval "$(rbenv init -)" 解决方法
问题似乎是你使用系统ruby安装的bundler,而不是一个rbenv ruby??安装.
运行ruby –version来确保你的rbenv ruby??是活动的,然后运行gem install bundler,然后是rbenv rehash,然后尝试重新安装你的gem,看看是否有效. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
- ruby-on-rails – 用于nil的未定义方法`map’:NilClass,是
- c# – 集合上的观察者
- PostgreSQL cluster: partitioning with plproxy (part II)
- VUE-Table上绑定Input通过render实现双向绑定数据的示例
- Flash Debug 方法
- ruby-on-rails – 如何在rails app中添加类的新文件夹?
- c# – 在OS X上使用MonoDevelop创建GUI应用程序
- 为什么C编译器不能做类型推断?
- c – 在传递的对象被破坏之前发出信号传递QObject指针作为参
- 南沙政府应急系统之GIS一张图(arcgis api for flex)讲解(