我刚开始在vendor /中使用bundler for gem包装.问题是某些宝石(如rspec和黄瓜)有二进制文件.my_app/vendor/gems/ruby/1.8/... cucumber-0.6.2/bin /下的二进制路径不在我的路径中,因此当我去运行黄瓜时,我无法找到命令.
从应用程序中执行捆绑的gem二进制文件的最简单方法是什么,而不是在我的路径中添加大量文件夹?
谢谢
我正在尝试使用ajaxful_rating_jquery的rails3分支,但我无法过去bundle install.这是我的Gemfile:
gem 'ajaxful_rating_jquery', :git => "git://github.com/kamui/ajaxful_rating_jquery.git", :branch => 'rails3'
Run Code Online (Sandbox Code Playgroud)
但是bundle install给了我这个错误:
Fetching source index for http://rubygems.org/
Could not find gem 'ajaxful_rating_jquery (>= 0)' in
git://github.com/kamui/ajaxful_rating_jquery.git (at rails3).
Source does not contain any versions of 'ajaxful_rating_jquery (>= 0)'
Run Code Online (Sandbox Code Playgroud)
我之前遇到过这个问题不同的宝石,但仍然不知道如何绕过它.
我有一个应用程序,我的测试通过rails 3.0.6.我已经确定了一个git提交,唯一的变化是我将Gemfile中的rails版本从3.0.6更改为3.0.8,并且我运行了bundle update.在那之后,我的测试失败了......足够公平.但是,当我尝试降级到3.0.6时,我的测试仍然失败..这表明某些东西不适用于降级.我尝试以下操作
change version in Gemfile from 3.0.8 to 3.0.8
run bundle update
rm Gemfile.lock
rm -rf vendor/bundle/*
bundle install
Run Code Online (Sandbox Code Playgroud)
在这之后,我的测试仍然失败.我在这里不知所措..我是否因为降级过程而遗漏了一些东西?
编辑:
当我在Gemfile中更改rails版本时,我有一个错误的假设,即没有其他任何改变.通过运行
bundle update
Run Code Online (Sandbox Code Playgroud)
我的Gemfile.lock最终将我的一些宝石更新为更新的github版本,而这些新的提交破坏了一些东西.当我在我的Gemfile中引用工作提交时,一切都会再次起作用
gem "carrierwave", :git => 'https://github.com/jnicklas/carrierwave.git', :ref => "0d2e9ee8706074059cb78f2f85232caf17327952"
Run Code Online (Sandbox Code Playgroud) 我有一个failed: "sh -c 'cd /var/www错误.然后通过在deploy.rb中添加以下内容来修复它...
set :default_environment, {
'PATH' => "/var/lib/gems/1.9.1/bin:$PATH"
}
Run Code Online (Sandbox Code Playgroud)
现在我收到了这个新错误.
** [out :: ip.address] Rails Error: Unable to access log file. Please ensure that /var/www/releases/20111208152807/log/production.log exists and is chmod 0666. The log level has been raised to WARN and the output directed to STDERR until the problem is fixed.
** [out :: ip.address] mkdir -p /var/www/releases/20111208152807/public/assets
** [out :: ip.address] mkdir -p /var/www/releases/20111208152807/public/assets
** [out :: ip.address] mkdir -p /var/www/releases/20111208152807/public/assets
** [out :: ip.address]
** …Run Code Online (Sandbox Code Playgroud) 我刚刚启动了一个新的应用程序,但是当我点击欢迎登陆页面上的"关于你的应用程序的环境"链接时,我收到了这个错误.
启动应用程序时出错当Pow尝试运行它时,您的Rack应用程序引发了异常.
Bundler :: GemNotFound:在任何来源中都找不到activesupport-3.2.6
我的应用正在运行:
我发现了类似的问题,其中问题是如何解决乘客问题,但我没有使用它.
当我运行gem list时,我得到:
*本地宝石*
actionmailer(3.2.6)actionpack(3.2.6)activemodel(3.2.6)activerecord(3.2.6)activeresource(3.2.6)activesupport(3.2.6)arel(3.0.2)builder(3.0.0)bundler( 1.1.4)coffee-rails(3.2.2)coffee-script(2.2.0)coffee-script-source(1.3.3)daemon_controller(1.0.0)erubis(2.7.0)execjs(1.4.0)fastthread( 1.0.7)加息(1.2.1)i18n(0.6.0)旅程(1.0.4)jquery-rails(2.0.2)json(1.7.3)mail(2.4.4)mime-types(1.19)multi_json( 1.3.6)乘客(3.0.13)多语言(0.3.3)机架(1.4.1)机架缓存(1.2)rack-ssl(1.3.2)机架测试(0.6.1)导轨(3.2.6) railties(3.2.6)rake(0.9.2.2)rdoc(3.12)rubygems-bundler(1.0.3)rvm(1.11.3.4)sass(3.1.20)sass-rails(3.2.5)链轮(2.4.3, 2.1.3)sqlite3(1.3.6)thor(0.15.4,0.15.3)倾斜(1.3.3)树顶(1.4.10)tzinfo(0.3.33)uglifier(1.2.6)
任何帮助将不胜感激,谢谢.
更新
source 'https://rubygems.org'
gem 'rails', '3.2.6'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'sqlite3'
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem …Run Code Online (Sandbox Code Playgroud) 当我在服务器上部署Capistrano时出现此错误,我已经尝试解决它大约3个小时现在失败,当cap运行bundle install时发生此错误
executing "cd $HOME/releases/20130629113827 && bundle install --gemfile $HOME/releases/20130629113827/Gemfile --path $HOME/shared/bundle --deployment --quiet --without development test"
executing command
The --deployment flag requires a Gemfile.lock. Please make sure you have checked
your Gemfile.lock into version control before deploying.
Run Code Online (Sandbox Code Playgroud)
这是我到目前为止所达到的:
我没有在Capistrano中使用捆绑器的任何设置,所以我错过了一个设置或什么?
提前致谢
我正在尝试在OS X 10.9上运行"捆绑更新",但它失败并出现以下错误消息:
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/Users/FrancisO/.rvm/rubies/ruby-1.9.3-p392/bin/ruby extconf.rb
checking for ruby/util.h... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.
Provided configuration options:
--with-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/Users/FrancisO/.rvm/rubies/ruby-1.9.3-p392/bin/ruby
/Users/FrancisO/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/mkmf.rb:381:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from /Users/FrancisO/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/mkmf.rb:506:in …Run Code Online (Sandbox Code Playgroud) 我试图安装中间人使用bundle install,并得到如下:
Installing eventmachine 1.0.8 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
/usr/local/var/rbenv/versions/2.1.7/bin/ruby extconf.rb
checking for rb_trap_immediate in ruby.h,rubysig.h... no
checking for rb_thread_blocking_region()... yes
checking for ruby/thread.h... yes
checking for rb_thread_call_without_gvl() in ruby/thread.h... yes
checking for inotify_init() in sys/inotify.h... no
checking for __NR_inotify_init in sys/syscall.h... no
checking for writev() in sys/uio.h... yes
checking for rb_thread_fd_select()... yes
checking for rb_fdset_t in ruby/intern.h... yes
checking for pipe2() in unistd.h... no
checking for accept4() in …Run Code Online (Sandbox Code Playgroud) 我正在尝试将带有Ruby 2.2.3和Capistrano 3的Rails 4.2.4应用程序部署到VPS服务器.我之前已经多次使用RVM完成了这项工作并且对我的其他应用程序没有任何问题,但是现在我在新机器和服务器上使用rbenv,我得到一个堆栈跟踪,如下所示:
DEBUG [a326a4c8] Command: cd /home/deploy/myapp/releases/20151226231303 && /usr/bin/env bundle install --path /home/deploy/myapp/shared/bundle --without development test --deployment --quiet
DEBUG [a326a4c8] /usr/bin/env:
DEBUG [a326a4c8] bundle: No such file or directory
cap aborted!
SSHKit::Runner::ExecuteError: Exception while executing as deploy@youspoof.us: bundle exit status: 127
bundle stdout: Nothing written
bundle stderr: /usr/bin/env: bundle: No such file or directory
SSHKit::Command::Failed: bundle exit status: 127
bundle stdout: Nothing written
bundle stderr: /usr/bin/env: bundle: No such file or directory
Tasks: TOP => deploy:updated => bundler:install …Run Code Online (Sandbox Code Playgroud) 在我的团队中,有些人喜欢使用pry-rails宝石而其他人不喜欢它.
有没有办法让一个辅助Gemfile用于开发,我没有将它提交给git并且仍在读取bundler?
bundler ×10
ruby ×4
gem ×3
rubygems ×3
capistrano ×2
deployment ×2
capistrano3 ×1
cucumber ×1
jquery ×1
macos ×1
middleman ×1
rack ×1
rack-pow ×1
rating ×1