bundler

how to prevent bundler from adding platform info to Gemfile.lock

懵懂的女人 提交于 2020-01-02 07:12:26
问题 every time I run bundle --without=production bundler adds platform information PLATFORMS x86-mingw32 to Gemfile.lock and I have to remove that info manually as I am deploying to Heroku. If I do not remove it, Gemfile.lock is not added to repository and causes errors. how can I prevent bundler from adding platform info to Gemfile.lock 回答1: I had a very similar question - Can I stop Bundler from adding RUBY VERSION to Gemfile.lock - and it turns out the answer is that it can't be done. Bundler

Using bundler inside my gem

空扰寡人 提交于 2020-01-01 19:34:09
问题 I wanted to use bundler inside gem I wrote. I had Gemfile and in my_gem_file.rb I have require 'rubygems' require 'bundler' Bundler.setup Bundler.require(:default) But when I build and install my gem I get exception Bundler::GemfileNotFound: Could not locate Gemfile. Is there any solution for using bundler inside gems? 回答1: Since your gem has specified its dependencies in its .gemspec you can assume that they will be available at runtime. Don't involve Bundler. You can, however, still make

How to bundle install via a CLI/Ruby system call?

泪湿孤枕 提交于 2020-01-01 11:56:10
问题 Is it possible to run bundle install from a ruby system call? I'm trying to install gems and run tests for a project under another path... For example the command is: "cd /some/other/project && bundle install && gem list && rspec spec" Ideally I want to just run the tests via a rake file in one project whilst making sure the relevant gems for that project are install. The cd seems to be working correctly, if I run: "cd /some/other/project && pwd" It does give the correct path. But if I do

install bundler using rvm, ruby 1.8.7 with gcc 4.7 on linux

不问归期 提交于 2020-01-01 09:59:22
问题 Issues building ruby 1.8.7 or installing the bundler gem with GCC 4.7 on linux (Fedora 17, Arch, etc.). This issue occurred for me using RVM. I was able to install 1.8.7, but unable to install the bundler gem. I would receive the following error: $ gem install bundler ~/.rvm/rubies/ruby-1.8.7-p358/lib/ruby/1.8/timeout.rb:60: [BUG] Segmentation fault ruby 1.8.7 (2012-02-08 patchlevel 358) [x86_64-linux] this issue is described in a number of locations, including: ruby-enterprise 1.8.7-12:

What does Bundler offer over RVM?

半腔热情 提交于 2020-01-01 09:23:20
问题 I am not sure what the differences are between these two tools. There seems to be a big overlap, but I have been using RVM and facing some miss-compatibility issues. What does Bundler do that RVM does not? 回答1: They serve different purposes. RVM creates a sandbox to manage your Ruby installations. As a part of that, it also lets you define gemsets. Bundler doesn't manage your Rubies, it works with the currently selected Ruby. So, I think you should consider RVM as the configuration manager

can't activate mysql2 (~> 0.3.6), already activated mysql2-0.3.2 in Rails 3.1

佐手、 提交于 2020-01-01 04:46:11
问题 I'm just trying to get the most basic of basic shell of a rails app running under 3.1, and I'm getting this weird error when I run bundle exec rake db:migrate- Please install the mysql2 adapter: `gem install activerecord-mysql2-adapter` (can't activate mysql2 (~> 0.3.6), already activated mysql2-0.3.2. Make sure all dependencies are added to Gemfile.) All the posts that I've read here and elsewhere say I should be using the newer mysql2 adaptor for rails 3.1, so I have- gem 'mysql2', '0.3.2'

Why I am getting Could not find multi_json-1.3.1 in any of the sources?

荒凉一梦 提交于 2020-01-01 02:45:09
问题 I have a simple Rails application I want to deploy to Heroku. When I run the below command git push heroku master The below error message is displayed. Could not find multi_json-1.3.1 in any of the sources ! ! Failed to install gems via Bundler. ! ! Heroku push rejected, failed to compile Ruby/rails app Here is my Gemfile gem 'rails', '3.2.3' gem 'pg' group :assets do gem 'sass-rails', '~> 3.2.3' gem 'coffee-rails', '~> 3.2.1' gem 'therubyracer', :platform => :ruby gem 'uglifier', '>= 1.0.3'

Rails: Options for build bundler gemfile

此生再无相见时 提交于 2020-01-01 02:44:09
问题 I have a gem, that must be build with some options. gem install pg --with-pg-include=/Library/PostgreSQL/9.0/include/ --with-pg-lib=/Library/PostgreSQL/9.0/lib/ Can I include this options in the Gemfile? In my Gemfile the pg command is gem "pg", "0.12.2" I want to provide some options after the version number. thx, tux 回答1: Here is the relevant text from the link posted in comments already: BUILD OPTIONS You can use bundle config to give bundler the flags to pass to the gem installer every

Ruby/RVM with @global gem - bundle run fails with `require': cannot load such file — bundler (LoadError)

本小妞迷上赌 提交于 2020-01-01 02:25:06
问题 I study linux for 1 month. While I tried to make all steps from Migrating from MySQL to Postgres on Heroku I've got an error I could not handle. When I try to install the mysqltopostgres gem from source: $ git clone https://github.com/maxlapshin/mysql2postgres.git $ cd mysql2postgres $ bundle install $ gem build mysqltopostgres.gemspec $ sudo gem install mysqltopostgres-0.2.20.gem I have an error on $ bundle install : /home/franchb/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/rubygems/core_ext/

ruby - bundle install/update too slow

社会主义新天地 提交于 2019-12-31 08:23:33
问题 I just installed RVM, Ruby, Rails etc. on my virtual ubuntu 12.04 32bit running in a virtualbox. Now I encounter the problem that for my first rails project bundle install or bundle update takes very long time. Even when I create a new project with rails (which includes bundle install ). I use only the standard gems: source 'https://rubygems.org' gem 'rails', '3.2.12' # Bundle edge Rails instead: # gem 'rails', :git => 'git://github.com/rails/rails.git' group :development do gem 'sqlite3', '1