我已经在这里搜索了相当多,以确保这个问题之前没有被问过。虽然有太多类似的案例,但我找不到其他人经历过我的情况。
我的情况是Rails / Bundler找不到任何对我新安装的Gems的引用。在这个例子中,是Nokogiri。
这是我在尝试运行bundle install时遇到的错误
Could not find gem 'nokogori (>= 0) ruby' in the gems available on this machine.
这是一个全新的OS X Yosemite安装,所以我认为可能是某个地方遗漏了一个核心步骤?
我使用了Thoughtbots的"
我正在尝试在我的Debian6系统上安装rbenv用于生产。做这件事最好的方法是什么?我尝试了一些来自github wiki页面(和)的but,但我想知道最好的实践是什么。
是通过部署用户安装还是在系统范围内安装更好?对于deploy用户,似乎不是所有用户都可以使用红宝石,即使我使用rbenv global 1.9.3-p125安装它,并且gem命令也不可用。这一定与我的路径有关,因为我只包含了
if [[ -d $HOME/.rbenv ]]; then
export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv in
我通过Gemfile和bundle install安装了rails
Gemfile
source "https://rubygems.org"
gem "rails", "5.0.6"
根据“成功”消息,gem似乎已成功安装。但是,即使在重新启动之后,它仍然无法从命令行中获得。
$ rails
The program 'rails' is currently not installed. You can install it by typing:
sudo apt install ruby-railties
You will
我正在尝试安装bundler的第二个版本。安装将输出成功消息,但新的bundler安装似乎根本不存在。如何更正此安装? # Use sudo because of *system* rbenv installation
sudo gem install bundler:2.1.4
# => Successfully installed bundler-2.1.4
# Check for existence of new installation, but only the old version is available
gem list bundler
# => bundle
我有一个安装了Ruby2.1.1的VPS安装程序,同样的版本也安装在本地。我运行14.04Ubuntu的开发机器报告ruby -v =ruby2.1.1p76(45161-02-24修订版) x86_64-linux和rbenv -v = rbenv 0.4.0-97-gfe0b243。
我最初在服务器上安装ruby时使用的是server,但似乎capistrano想要解决这个问题。
当我运行cap staging deploy时,得到一个错误
rbenv: cap: command not found
The `cap' command exists in these Ruby ve
我正在使用rails 4.2.4,并尝试在我的应用程序中安装回形针宝石。在我运行包install.Then时编辑了我的创业板文件之后,我得到了这个错误。
Bundler::GemspecError: Could not read gem at /home/darkpasenger/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/cache/mimemagic-0.3.0.gem. It may be corrupted.
安装mimemagic (0.3.0)时发生错误,而Bundler无法继续。
确保gem install mimemagic -v
我能够安装并执行一个gem,如下所示:
rbenv install 2.4.1
rbenv local 2.4.1 # enter the environment
gem install fpm
fpm --version
我也期望能够从外部环境执行gem,例如:
rbenv local --unset # leave the environment
rbenv rehash # update shims
fpm --version
但我得到的却是:
rbenv: fpm: command not found
The `fpm' command exists in these Rub
我已经考虑这个问题一段时间了,似乎不能永久解决这个问题。希望有人能帮我澄清一下。
我非常熟悉如何设置我的路径并使用ZSH。我有一吨的自定义助手,插件,等等进行得很好。
但是出于某些原因,当我执行gem install gemname并尝试在全球范围内使用它时,它有时会说gem not found.我发现最近zeus发生了这种情况
tmtm|master⚡ ⇒ gem which zeus
/Users/andrewmartin/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/zeus-0.13.3/lib/zeus.rb
tmtm|ma
我试着用邦德勒和rbenv。我一直工作到今天。我唯一能打破它的是gem pristine --all或gem cleanup?在尝试安装bundler时,我会得到以下错误。
Antarrs-MacBook-Pro:some-app antarrbyrd$ sudo gem install bundler
Password:
Bundler gave the error "Could not find mail-2.5.4 in any of the sources" while processing "/Users/antarrbyrd/dev/some-app/Gem
我正在使用Vagrant + VirtualBox为我的Rails应用程序设置一个虚拟机。我正在清理一个在.sh中引用的Vagrantfile配置脚本,如下所示:
config.vm.provision "shell", path: "script/provision-script.sh"
这个提供脚本做了很多事情,但是最后它应该安装rbenv版本,然后使用rbenv来安装Ruby2.2.1。提供脚本的这一部分如下所示:
echo "setting up rbenv"
# execute the remaining commands as va
我有一个在使用RVM时创建的应用程序。我切换到rbenv,但无法让它工作。当我尝试运行服务器时,它显示找不到formastic gem:
Could not find formtastic-2.2.1 in any of the sources
Try running `bundle install`.
如果我运行bundle install,它会提示我的包已经完成,但是formtastic没有列出。
但是,bundle show formtastic显示它已安装:
bundle show formtastic
/Users/me/.rbenv/versions/1.9.3-p327/lib/
我已经使用Homebrew安装了rbenv。
$ rbenv local
2.4.0
$ rbenv global
2.4.0
$ ruby -v
ruby 2.4.0p0 (2016-12-24 revision 57164) [x86_64-darwin16]
当我检查Rails版本时,我得到以下消息;
Rails is not currently installed on this system. To get the latest version, simply type:
$ sudo gem install rails
You can then rerun your
我在用rbenv对付Debian。Debian预装了红宝石1.9.3。我安装了rbenv并使用它来安装ruby2.1.2。然后,我使用rails new创建了一个新的rails应用程序。
rbenv versions
给出
system
* 2.1.2 (set by /home/jordanmorris/code/TestRail/.ruby-version)
rbenv global给出2.1.2
rbenv local (在新的应用程序文件夹中)提供2.1.2
ruby -v给出2.1.2
which ruby给出/home/jordanmorris/.rbenv/shims/ruby
我正在尝试在Debian 6上做一个gem安装therubyracer。我在1.9.3上使用rbenv。当我最初这样做的时候,它抱怨libv8,所以我做了一个gem安装libv8。现在,当我运行gem install the therubyracer时,我得到以下错误,说找不到文件。然而,它所说的文件,/home/chop/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/gems/libv8-3.11.8.3-x86_64-linux/vendor/v8/out/x64.release/obj.target/tools/gyp/libv8_base