Tag: bundler

gem install nokogiri -v’1.6.8.1’失败了

构建一个新的Rails应用程序并解决nokogiri的问题。 据说尝试gem install nokogiri -v ‘1.6.8.1’失败,输出如下。 我尝试删除Gemfile.lock并使用另一个没有问题的应用程序的Gemfile – bundle install仍然失败。 最初的失败是bundle install ,它继续在其他应用程序中工作。 从控制台: gem install nokogiri -v ‘1.6.8.1’ Building native extensions. This could take a while… ERROR: Error installing nokogiri: ERROR: Failed to build gem native extension. current directory: ~/.gem/ruby/2.3.1/gems/nokogiri-1.6.8.1/ext/nokogiri ~/.rubies/ruby-2.3.1/bin/ruby -r ./siteconf20161008-60071-tmqi2l.rb extconf.rb Ignoring byebug-6.0.2 because its extensions are not built. Try: gem […]

如何在部署到heroku时解决rails中的更新捆绑器警告?

如何解决以下警告? 我将我的ruby版本更新为2.3.1并将版本更新为4.2.6。 当我将我的应用程序推送到heroku时,我收到此警告。 remote: Cleaning up the bundler cache. remote: Warning: the running version of Bundler is older than the version that created the lockfile. We suggest you upgrade to the latest version of Bundler by running `gem install bundler`. remote: Removing mime-types-data (3.2016.0221) 我删除了Gemfile.lock并运行了bundle install,并尝试更新捆绑包,但警告永远不会消失。 suramai@rails-tutorial:~/workspace/converse (master) $ gem install bundler Successfully installed bundler-1.12.4 […]

捆绑安装:错误:无法构建gem原生扩展。 nio4rgem

我目前正在使用以下项目: rvm 1.26.11 ruby2.2.1p85 我尝试运行bundle install但是一直收到以下错误: Gem::Ext::BuildError: ERROR: Failed to build gem native extension. 和以下: An error occurred while installing nio4r (1.0.0), and Bundler cannot continue. Make sure that `gem install nio4r -v ‘1.0.0’` succeeds before bundling. 当我尝试运行gem install nio4r -v ‘1.0.0’ : Building native extensions. This could take a while… ERROR: Error installing nio4r: […]

由于权限被拒绝,`bundle install`失败了

我在我的新服务器上安装了bundler gem,当我尝试执行bundle install ,它失败并出现此错误: Unfortunately, a fatal error has occurred. Please see the Bundler troubleshooting documentation at http://bit.ly/bundler-issues. Thanks! /usr/lib/ruby/1.9.1/fileutils.rb:247:in `mkdir’: Permission denied – /var/lib/gems (Errno::EACCES) 我的服务器是Debian wheezy(7.1),安装了默认的ruby 1.9.3软件包。 我已经像这样配置了/etc/gemrc : gem: –user-install user gem: –user-install允许用户在本地安装gem。 bundler gem安装在我的用户的gems dir ~/.gem就像我想要的命令: gem install bundler (no sudo)。 但捆绑者希望将gems安装到/var/lib/gems而不是我的gems目录:( 我不明白Bundler有什么问题…为什么它不尝试在我想要的地方安装gem(在我的gems local dir中)? ps:在我的笔记本电脑中,安装了archlinux和默认的ruby 2.0.0软件包,捆绑器安装用户的gem没有问题。

是否有任何Haskell土地相当于Ruby-land的Bundler等。 al,如果没有,如何设计一个如此结构的项目?

读者注意 :请耐心等待。 我保证会有一个问题。 我有一个问题要解决,并对自己思考“哦,我会用Ruby做的。” $ bundle gem problemsolver create problemsolver/Gemfile create problemsolver/Rakefile create problemsolver/.gitignore create problemsolver/problemsolver.gemspec create problemsolver/lib/problemsolver.rb create problemsolver/lib/problemsolver/version.rb Initializating git repo in /tmp/harang/problemsolver 删除在s.add_development_dependency “rspec” problemsolver/problemsolver.gemspec对s.add_development_dependency “rspec”的评论,然后 $ bundle exec rspec –init The –configure option no longer needs any arguments, so true was ignored. create spec/spec_helper.rb create .rspec 新测试将进入spec/并且必须位于以_spec.rb结尾的文件中。 例如, spec/version_spec.rb describe ‘Problemsolver’ […]

gem install debugger -v’1.5.0’失败

我试图在小牛队的大型项目中做bundle ,虽然这是rbenv的全新安装,但是我的环境有些gem坏了或者出了什么问题。 $ gem install debugger -v ‘1.5.0’ Building native extensions. This could take a while… ERROR: Error installing debugger: ERROR: Failed to build gem native extension. /Users/samat/.rbenv/versions/1.9.3-p448/bin/ruby extconf.rb checking for rb_method_entry_t.called_id in method.h… no checking for rb_control_frame_t.method_id in method.h… no checking for rb_method_entry_t.called_id in method.h… no checking for rb_control_frame_t.method_id in method.h… no Makefile creation […]

什么时候需要在rails Gemfile中使用require?

在我的gemfile中,我有类似的东西: gem ‘net-sftp’, ‘2.1.1’, :require => ‘net/sftp’ gem ‘backup’, ‘3.0.27’ gem ‘watu_table_builder’, :require => ‘table_builder’ gem ‘browser’, ‘0.1.6’ 在Gemfile中你需要一个需求吗? 我还发现了类似:require => false 。 救命?

捆绑安装后,Gems不在Local Gems中

新机器。 新的rbenv安装。 新的rbenv-gemset安装。 新的ruby-2.0.0安装。 新的rails 4.0.0应用程序。 当我 $ bundle install 从rails app目录,我得到 Your bundle is complete! It was installed into ./vendor/bundle 但是,如果我那么 $ gem list 所有安装的gem都没有显示出来。 我跑了 $ rbenv rehash 为什么会这样? 附加信息: $ which bundle /usr/local/var/rbenv/shims/bundle $ rbenv which bundle /usr/local/var/rbenv/versions/2.0.0-p247/bin/bundle $ rbenv which ruby /usr/local/var/rbenv/versions/2.0.0-p247/bin/ruby $ ruby –version ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-darwin12.4.0] […]

你能在Gemfile中拥有多个版本的gem吗?

我想要的是这样的: gem ‘rack’, ‘1.3.3’, ‘1.2.4’ 因此,当gem需要不同版本的机架时,它们都是平庸的。 这可能吗?

`bundle install`失败(因为git协议)

有了这个简单的Gemfile, source ‘https://rubygems.org’ gem ‘activerecord’, “~> 2.2.3” gem ‘activerecord-sqlserver-adapter’, github: ‘arthrex/activerecord-sqlserver-adapter’, :branch => ‘2-3-stable’ bundle install失败 Fetching git://github.com/arthrex/activerecord-sqlserver-adapter.git fatal: unable to connect to github.com: github.com[0: 192.30.252.131]: errno=No error Git error: command `git clone “git://github.com/arthrex/activerecord-sqlserver-adapter.git” “c:/Languages/Ruby/1.9.3/lib/ruby/gems/1.9.1/cache/bundler/git/activerecord-sqlserver-adapter-8019982c6a12a1297e8a135275 d94bdee6cd893b” –bare –no-hardlinks` in directory c:/Users/BZISAD0/Code/CSV has failed. 起初我以为我的代理配置搞砸了但是我可以执行这个命令没有问题: $ git clone http://github.com/arthrex/activerecord-sqlserver-adapter.git 但是,使用git协议,它会失败: $ git clone git://github.com/arthrex/activerecord-sqlserver-adapter.git Cloning into […]