Tag: rbenv

rbenv乘客无法加载此类文件 – bundler / setup

我的乘客是作为gem安装的。 Nginx由passenger-install-nginx-module 。 ruby 2.1.1有3个gemsets,rubygemset rails4_1是这个应用程序的正确。 其他post显示类似的问题( 1,2,3 ),但没有一个解决我的问题。 [ 2014-09-29 14:29:17.1212 13182/7f32e5938700 Pool2/Implementation.cpp:287 ]: Could not spawn process for application /home/canoe/apps/app1: An error occured while starting up the preloader. Error ID: b57602d4 Error details saved to: /tmp/passenger-error-jcmrkH.html Message from application: cannot load such file — bundler/setup (LoadError) /home/canoe/.rbenv/versions/2.1.1/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require’ /home/canoe/.rbenv/versions/2.1.1/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require’ /home/canoe/.rbenv/versions/2.1.1/gemsets/rails4_1/gems/passenger-4.0.52/lib/phusion_passenger/loader_shared_helpers.rb:263:in `block in […]

rbenv问题:您的Ruby版本是1.9.3,但您的Gemfile指定为2.2.0

我在unicorn启动脚本中设置Ruby版本时遇到问题。 当我在调试模式下运行启动脚本时,我有以下输出。 vagrant@vagrant-ubuntu-trusty-64:~$ sudo sh -x /etc/init.d/unicorn start + set -e + USAGE=Usage: /etc/init.d/unicorn + USER=vagrant + APP_NAME=my_app + APP_ROOT=/vagrant + RAILS_ENV=production + export RBENV_ROOT=/home/vagrant/.rbenv + export PATH=/home/vagrant/.rbenv/bin:/home/vagrant/.rbenv/shims:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin + SET_RUBY=cd /vagrant && rbenv rehash && rbenv local 2.2.0 + CMD=cd /vagrant && rbenv rehash && rbenv local 2.2.0;bundle exec unicorn -c config/unicorn.rb -E production -D […]

Rbenv许可否认了问题

在将此部署到我的DO Droplet后,我无法运行Rails应用程序。 我按照本指南部署(并安装了包括rbenv在内的所有内容 )。 Rbenv似乎安装正确,但应用程序没有运行,nginx错误日志说“ 无法执行/root/.rbenv/shims/ruby权限被拒绝(13) ” 我无法理解这个错误,希望任何人都可以帮忙。

从rvm切换到rbenv,现在无法使用rails s。 无法激活bundler-1.12.5,已经激活了bundler-1.13.0.rc.1(Gem :: LoadError)

第一个错误: `check_version_conflict’: can’t activate bundler-1.12.5, already activated bundler-1.13.0.rc.1 (Gem::LoadError) 陷入这个错误: /Users/phillipjones/workspace/messengerApp/vendor/bundle/gems/sqlite3-1.3.11/lib/sqlite3.rb:6:in `require’: dlopen(/Users/phillipjones/workspace/messengerApp/vendor/bundle/gems/sqlite3-1.3.11/lib/sqlite3/sqlite3_native.bundle, 9): Library not loaded: /Users/phillipjones/.rvm/rubies/ruby-2.3.1/lib/libruby.2.3.0.dylib (LoadError) Referenced from: /Users/phillipjones/workspace/messengerApp/vendor/bundle/gems/sqlite3-1.3.11/lib/sqlite3/sqlite3_native.bundle Reason: image not found – /Users/phillipjones/workspace/messengerApp/vendor/bundle/gems/sqlite3-1.3.11/lib/sqlite3/sqlite3_native.bundle 以下是导致此问题的情况以及我尝试解决的步骤: 从rvm切换到rbenv后,我遇到了使用rvm创建的应用程序的问题。 我无法运行rails s。 首先我得到了这个错误: Phillip-Joness-MacBook:messengerApp phillipjones$ rails s /Users/phillipjones/.rbenv/versions/2.3.1/lib/ruby/2.3.0/rubygems/specification.rb:2274:in `check_version_conflict’: can’t activate bundler-1.12.5, already activated bundler-1.13.0.rc.1 (Gem::LoadError) from /Users/phillipjones/.rbenv/versions/2.3.1/lib/ruby/2.3.0/rubygems/specification.rb:1403:in `activate’ from /Users/phillipjones/.rbenv/versions/2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_gem.rb:68:in `block in gem’ from […]

无法更改rbenv全局ruby版本

我最近从RVM切换到rbenv,我似乎无法在ruby版本之间切换,即使’rbenv版本’告诉我我有我想切换到的版本。 这就是我在做的事情: ruby -v ruby 1.8.7 (2012-02-08 patchlevel 358) [universal-darwin12.0] 我想切换到1.9.2-p290所以我们确保在我的版本中使用它: ruby versions 1.8.7-p370 1.9.2-p290 1.9.3-p125 1.9.3-rc1 好了,现在我看到我有它让我们尝试更改全局rbenv: rbenv global 1.9.2-p290 ruby -v ruby 1.8.7 (2012-02-08 patchlevel 358) [universal-darwin12.0] 似乎1.8.7仍然是活跃的全球ruby。 所以,让我们尝试在我的项目中将其设置为本地。 rbenv local 1.9.2-p290 这会在我的rails项目中创建一个.rbenv-versions文件。 伟大的让我们尝试并运行捆绑: Gem::InstallError: factory_girl requires Ruby version >= 1.9.2. An error occurred while installing factory_girl (4.1.0), and Bundler cannot continue. Make […]

Pow不使用RBENV使用Ruby 2.0

我通过rbenv (ruby-build)安装了Ruby 2.0.0-p247,不幸的是我的Pow.cx无效。 有没有人有这种经历? 我得到了以下战俘 Error starting application Your Rack app raised an exception when Pow tried to run it. ~/.rbenv/versions/1.9.3-p429/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require’ ~/.rbenv/versions/1.9.3-p429/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require’ ~/Code/sandwiches_app/config/boot.rb:6:in `’ ~/.rbenv/versions/1.9.3-p429/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require’ ~/.rbenv/versions/1.9.3-p429/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require’ 任何见解都非常感谢。 看起来它正在看rbnenv的Ruby版本,但是我设置了rbnenv全局,shell和本地(在应用程序.ruby-version中)以使用Ruby 2.0.0-p247。 我正在使用ZSH并尝试更新自制程序,rbenv以及冷启动。

Bundler似乎无法通过Rbenv找到正确的Ruby

多年来我一直使用RVM作为我的Ruby版本管理器,但我想切换到rbenv以简化它。 但是我发现部署有些奇怪的问题。 这里似乎出错了: # env RBENV_ROOT=\”/home/deploy/.rbenv\” PATH=\”/home/deploy/.rbenv/shims:/home/deploy/.rbenv/bin:$PATH\” /home/deploy/.rbenv/bin/rbenv exec bundle install –gemfile /domains/myapp.com/releases/20140119013611/Gemfile –path /domains/myapp.com/shared/bundle –deployment –without development test > rbenv: bundle: command not found > The `bundle’ command exists in these Ruby versions: > 2.0.0-p353 好的,所以我指定了我想要的rbenv版本 – # env RBENV_ROOT=\”/home/deploy/.rbenv\” PATH=\”/home/deploy/.rbenv/shims:/home/deploy/.rbenv/bin:$PATH\” RBENV_VERSION=\”2.0.0-p353\” /home/deploy/.rbenv/bin/rbenv exec bundle install –gemfile /domains/myapp.com/releases/20140119013611/Gemfile –path /domains/myapp.com/shared/bundle –deployment –without development test […]

这些Ruby版本中存在`heroku’命令:

我遇到了heroku toolbelt的主要问题。 我正在使用雪松14堆栈,当我尝试使用不是ruby 2.0.0-dev的ruby版本时,我收到此错误。 rbenv: heroku: command not found The `heroku’ command exists in these Ruby versions: 2.0.0-dev 我需要heroku使用ruby 1.9.3并且我不认为雪松14支持那个版本的ruby。 有人可以解释一下,为什么我只允许使用带有ruby 2.0.0-dev heroku以及如何安装支持ruby 1.9.3的旧堆栈?

尝试使用Capistrano 3和rbenv安装rails应用程序

我安装了Ruby 2.1.1的VPS设置,并在本地安装了相同的版本。 我的dev机器运行14.04 Ubuntu报告ruby -v = ruby​​ 2.1.1p76(2014-02-24修订版45161)[x86_64-linux]和rbenv -v = rbenv 0.4.0-97-gfe0b243。 我最初使用刀独奏在服务器上安装了ruby,但似乎capistrano想要照顾这个。 当我运行cap staging deploy时,我收到一个错误 rbenv: cap: command not found The `cap’ command exists in these Ruby versions: 2.1.0 的Gemfile group :development do gem ‘capistrano’, github: ‘capistrano/capistrano’, ref: ‘master’ gem ‘capistrano-rails’, github: ‘capistrano/rails’, ref: ‘master’ gem ‘capistrano-bundler’ gem ‘capistrano-rbenv’, “~> 2.0” end Capfile require […]

为什么我会收到错误“您的Ruby版本是2.0.0,但您的Gemfile指定为2.2.2”,尽管我安装了2.2.2

我正在使用rbenv并且我得到错误Your Ruby version is 2.0.0, but your Gemfile specified 2.2.2当我在项目中运行bundle install命令时Your Ruby version is 2.0.0, but your Gemfile specified 2.2.2 。 奇怪的是我实际安装了2.2.2版本(我的Gemfile指定),而不是2.0.0版本。 (见下图)。 我尝试了这个线程中提供的解决方案: 你的Ruby版本是2.0.0,但是你的Gemfile指定了2.1.0 ,但它没有效果。 如果这有任何区别,我会使用优胜美地的MacBook Air。 更新: which ruby – > Users/myuser/.rbenv/shims/ruby ruby -v – > ruby 2.2.2p95 (2015-04-13 revision 50295) [x86_64-darwin14] rbenv global 2.2.2和rbenv rehash ,没有任何效果 which bundle – > /usr/bin/bundle gem […]