标签: bundler

如何在路径中使用bundler gem二进制文件

我刚开始在vendor /中使用bundler for gem包装.问题是某些宝石(如rspec和黄瓜)有二进制文件.my_app/vendor/gems/ruby​​/1.8/... cucumber-0.6.2/bin /下的二进制路径不在我的路径中,因此当我去运行黄瓜时,我无法找到命令.

从应用程序中执行捆绑的gem二进制文件的最简单方法是什么,而不是在我的路径中添加大量文件夹?

谢谢

ruby cucumber bundler

0
推荐指数
1
解决办法
3338
查看次数

使用rails 3无法获得ajaxful-rating-jquery

我正在尝试使用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)

我之前遇到过这个问题不同的宝石,但仍然不知道如何绕过它.

gem jquery rating bundler ruby-on-rails-3

0
推荐指数
1
解决办法
1381
查看次数

如何降级我的rails版本?

我有一个应用程序,我的测试通过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)

ruby rubygems ruby-on-rails bundler ruby-on-rails-3

0
推荐指数
1
解决办法
1979
查看次数

为什么我在capistrano生成的文件的部署中获得Permission denied错误?

我有一个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)

ruby deployment capistrano ruby-on-rails bundler

0
推荐指数
1
解决办法
5715
查看次数

启动应用程序Bundler :: GemNotFound时出错

我刚刚启动了一个新的应用程序,但是当我点击欢迎登陆页面上的"关于你的应用程序的环境"链接时,我收到了这个错误.

启动应用程序时出错当Pow尝试运行它时,您的Rack应用程序引发了异常.

Bundler :: GemNotFound:在任何来源中都找不到activesupport-3.2.6

我的应用正在运行:

  • Rails 3.2.6
  • Ruby 1.9.3p194
  • Rubygems 1.8.24
  • RVM 1.14.5
  • 战俘0.4.0

我发现了类似的问题,其中问题是如何解决乘客问题,但我没有使用它.

当我运行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)

gem rack ruby-on-rails bundler rack-pow

0
推荐指数
1
解决办法
1万
查看次数

--deployment标志需要Gemfile.lock.在部署之前,请确保已将Gemfile.lock检入版本控制

当我在服务器上部署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)

这是我到目前为止所达到的:

  • 服务器上都存在Gemfile和Gemfile.lock
  • Gemfile.lock直接存在于应用程序根目录中(它不在文件夹或其他内容中)
  • releases文件夹在实际版本目录旁边没有任何文件
  • 我将Gemfile中的所有gem与Gemfile.lock进行了比较,它们都存在
  • 我在scm中检查了我的Gemfile和Gemfile.lock,并且.bundle在忽略列表中

我没有在Capistrano中使用捆绑器的任何设置,所以我错过了一个设置或什么?

提前致谢

deployment capistrano bundler

0
推荐指数
1
解决办法
1725
查看次数

OS X 10.9下的捆绑失败(预览3)

我正在尝试在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)

macos rubygems bundler

0
推荐指数
1
解决办法
974
查看次数

由于gem安装失败,无法安装中间人

我试图安装中间人使用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)

gem bundler middleman

0
推荐指数
1
解决办法
916
查看次数

rails 4找不到rbenv包

我正在尝试将带有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)

bundler ruby-on-rails-4 capistrano3

0
推荐指数
1
解决办法
1066
查看次数

如何为项目安装多个Gemfiles?

在我的团队中,有些人喜欢使用pry-rails宝石而其他人不喜欢它.

有没有办法让一个辅助Gemfile用于开发,我没有将它提交给git并且仍在读取bundler

ruby rubygems ruby-on-rails bundler

0
推荐指数
1
解决办法
438
查看次数