FAQ Database Discussion Community


rbenv: “bundle exec spring” not working…?

ruby-on-rails,ruby,bundler,rbenv
why doesn't bundle exec spring work? i am already calling bundle exec and that returns an error. i am okay with calling bundle exec all the time. (this is the solution to the possible duplicate question). i will not update my Gemfile (via bundle update spring) or uninstall a version...

Ruby “bundle install” error on Openshift

ruby-on-rails,ruby,git,bundler,openshift
I'am fairly new in Ruby and terms of deploying app through remote tools. I've tried to deploy my App on free openshift account. And I connot run application. When I run application i get this error: You have already activated rack 1.5.2, but your Gemfile requires rack 1.6.0. Using bundle...

CircleCI gems caching

ruby-on-rails,gem,bundler,circleci
Is it possible to cache gems, so that bundle install will not install bunch of gems for every build? This takes 5 minutes on every build, that is too much. I've added this to the circle.yml config: dependencies: cache_directories: - "/home/ubuntu/.rvm/gems/ruby-2.1.2/gems/" This is the common directory which is provided by...

Bundle install not working on Windows

ruby,heroku,sinatra,bundler,heroku-toolbelt
I am trying to deploy my Sinatra app on Heroku server and for that i need to follow few steps. One of them is "Bundle install" but I am facing below issue while executing "Bundle install" - [I am using windows machine] I saw many posts on this site for...

Why is bundle --deployment trying to rebuild gem ffi-1.9.6?

ruby-on-rails,ruby,bundler,ffi
I've run bundle --deployment on a machine with a full dev environment, and then copied the vendor/bundle to a second machine not having the full dev environment. On the second machine, a simple 'bundle exec irb' gives: /usr/lib64/ruby/2.1.0/rubygems/ext/builder.rb:89:in `run': ERROR: Failed to build gem native extension. (Gem::Ext::BuildError) /usr/bin/ruby.ruby2.1 extconf.rb mkmf.rb...

DEPRECATION WARNING while using bundle install

ruby-on-rails,ruby,ruby-on-rails-4,rake,bundler
So I am trying to do bundle install . But it is throwing the below errors. What is the problem here? bundle exec rake db:create:all DEPRECATION WARNING: String based terminators are deprecated, please use a lambda. (called from included at /home/.gem/ruby/2.1.3/bundler/gems/authlogic-09163c7d2a9b/lib/authlogic/session/callbacks.rb:66) DEPRECATION WARNING: String based terminators are deprecated, please use...

Ruby Bundle Install in deployment mode

ruby,bundler
I'm installing a ruby git-repo on several servers which have no internet connectivity. I had cloned that repo to my local machine, and used $ bundle install --path vendor/bundle to package all dependencies. Then I copied the whole directory to the target server, and tried $ bundle install --deployment, which...

How to deal with forked gems and bundle

ruby-on-rails,git,github,gem,bundler
I've forked a gem and it is hosted on Github. Then, in Gemfile this is what I've got: gem 'mongoid-scroll', git: 'https://github.com/bgvo/mongoid-scroll.git' Whenever I make changes to the gem using Pry gem-opem command, changes are saved under the following directory: /Users/borjagvo/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/ruby/2.1.0/bundler/gems/ Some things confuse me: 1) In this directory there...

Unable to require pry via Bundler.setup for a Ruby application that uses a Gemfile

ruby,bundler,gemfile,pry
I'm writing a simple ruby application(basically using PORO's). I've added a Gemfile to it and I'm trying to require the pry gem(which is useful for adding breakpoints while debugging, as the application grows) via the Gemfile but I'm unable to require that gem using Bundler.setup, things work fine with Bundler.require....

'bundle exec' complains about gem not being installed, even after 'bundle install'

ruby,gem,bundler
I have a website using Jekyll with Github Pages. After previously messing about with versions and RVM on another computer, on this one I opted to stick with just one version of Ruby and per-project environments using bundler. I have a pretty simple Gemfile: [$]> cat Gemfile source 'https://rubygems.org' gem...

Bundler installing gem that's already installed

ruby,gem,chef,bundler
I believe I'm misunderstanding the way bundler works, but from the bundle install documentation it seems to indicate bundler will use locally installed system gems. ... --system: Install to the system location ($BUNDLE_PATH or $GEM_HOME) even if the bundle was previously installed somewhere else for this application ... The --system...

Adding a customized version of bundler as a dependency in a Gemfile

ruby,bundler
How can I make a typical gem setup (as generated by bundle gem) run a customize version of bundler? I've added: #group :development do gem "bundler", github: 'pjump/bundler' #end to my Gemfile (with or without the the hash symbols), and bundle install works, but bundle exec keeps telling me that...

Error installing Nokogiri on bundle install but already installed

ruby-on-rails,ruby,nokogiri,bundler
I'm having issues with bundling my Gemfile. I have Nokogiri installed already yet when I run bundle install it fails to load Nokogiri. Installing Nokogiri: gem install nokogiri Building native extensions. This could take a while... Successfully installed nokogiri-1.6.6.2 Parsing documentation for nokogiri-1.6.6.2 Done installing documentation for nokogiri after 2...

Rails doesn't load actionform gem from Gemfile

ruby-on-rails,gem,rubygems,bundler
My Rails 4.2 app fails to load some GitHub hosted gem (installed via bundler v1.8.2). I am using rvm 1.26.10 (master) In my Gemfile, gem 'simple_form', '~> 3.1.0' gem 'actionform', :github => 'rails/actionform' Bundler install them in different location: $ bundle show simple_form /Users/me/.rvm/gems/[email protected]_app/gems/simple_form-3.1.0 $ bundle show actionform /Users/me/.rvm/gems/[email protected]_app/bundler/gems/actionform-4a858fecf4c2 Rails...

Gem installation fails after use of Bundler for cups gem

ruby-on-rails,ruby,gem,bundler,rbenv
So I'm currently working on a project with RoR in a linux environment that involves a print server. We're using CUPS (see http://cups.org). I'm trying to bundle all the various gems that I'm using but this is the only one that doesn't work. I've cp'd the command prompt output and...

Postgres not installing in Bundler (Ruby on Rails)

ruby-on-rails,postgresql,bundler
I am getting pretty desperate, i have tried every answer on the subject but nothing seems to work. the error log looks like this: Gem::Ext::BuildError: ERROR: Failed to build gem native extension. /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby -r ./siteconf20150523-16458-46bzoo.rb extconf.rb --with-pg-config=/Applications/Postgres.app/Contents/Versions/9.3/bin/pg_config Using config values from /Applications/Postgres.app/Contents/Versions/9.3/bin/pg_config sh:...

Why is bundler requiring an extremely old version of a gem when version not specified?

ruby,gem,bundler
I have a Gemfile that looks like this: gem 'google-api-client', :require => 'google/api_client' gem 'my_baseimage', '0.0.3', :git => 'https://github.com/xxx/BaseImage.git' I have a base gem that requires a bunch of common gems across projects. However, when I run bundle install, I see errors like this: In Gemfile: activerecord (>= 0) ruby...

How can I avoid bundlers warning about multiple sources when I have all gems in my .gemspec?

ruby,rubygems,bundler,gemspecs
In my own gem, I have a Gemfile that looks basically like this: source 'https://my.gemserver.com' source 'https://rubygems.org' gemspec My .gemspec has all dependencies listed as add_dependency and add_development_dependency. As of Bundler 1.8, I get the warning: Warning: this Gemfile contains multiple primary sources. Using `source` more than once without a...

Running bin/console returns “: No such file or directory”

bundler
I built a gem using "bundle gem gem_name" back on bundler 1.7. I'm now using bundler 1.9.4. I created a new gem using 1.9.4 and I noticed the gem template has changed around a bit. I decided to go back to the old 1.7 gem and upgrade it to the...

What's the point of the --without option in bundle install?

ruby,bundler
If your app doesn't need the gems in a certain group, why can't you just let bundler install them with a regular bundle install, and then simply not use them? Is it just a cleanliness issue - i.e. not installing extra things you don't need - or can it break...

Why do some methods in my locally edited gem not appear in my Rails console?

ruby-on-rails,ruby,ruby-on-rails-4,bundler
I am working with a gem in my Rails project and I am modifying the gem locally. In my Gemfile, I have: gem 'ancestry', path: '/Users/me/.rvm/gems/[email protected]_tree_app/bundler/gems/ancestry-eb5a3e448112' When I run bundle I get this: Using ancestry 2.1.4 from source at /Users/me/.rvm/gems/[email protected]_tree_app/bundler/gems/ancestry-eb5a3e448112 I have opened this file and added the following two...

Bundler can't find a gem that I can install using gem install

ruby,gem,bundler,rbenv
I am developing two gems side-by-side, one that contains some pure ruby functionality and one with an interface for Rails. The Rails gem (rwanda-rails) depends on the pure Ruby gem (rwanda) with spec.add_runtime_dependency "rwanda" "~> 0.6.0" in the .gemspec. However, for some reason bundler can't find this new version --...

Rubygems: specify dependency on the latest version of a gem

ruby,gem,rubygems,bundler
I'm developing a gem A that depends on another gem B. I need the user of my gem to have the latest version of B whatever it is. So I would like to say in my gemspec something like spec.add_dependency "B", :latest The reason for this is that B contains...

Errors when trying to start a new Rails app with Spree Commerce

ruby-on-rails,ruby,bundler,spree,thor
I am getting the following error when trying to install Spree Commerce (a clean install) into a new rails application. Could not load generator "generators/spree/install/install_generator". Error: uninitialized constant Bundler::Thor::Base. Any help would be greatly appreciated! I have already checked the resources on the SpreeCommerce Documentation, Spree's Github, and similar issues...

“PHP Composer” compared with “Ruby Gems and Bundler”

php,ruby,gem,composer-php,bundler
(As first, this question is not "which is better" question. I just want to know how they are similar and differ in functionality perspective.) I'm php developer and currently learning ruby. In these days, many php developers are encouraged to use Composer for dependency management. Before asking questions, I would...

How Can I Specify A Minimum Ruby Version in a Gemfile?

ruby,bundler
I know that I can specify a Ruby version in a Gemfile like so: ruby '2.0.0' However, instead of setting the exact Ruby version, I'd like to be able to specify a minimum Ruby version so that my scripts remain compatible with new version of Ruby....

An error occurred while installing nokogiri (1.6.0), and Bundler cannot continue

ruby-on-rails,ruby,gem,bundler
I tried to open the rails console, but found the error as below: rails c Could not find nokogiri-1.6.0 in any of the sources Run `bundle install` to install missing gems. then I run the bundle install Installing nokogiri (1.6.0) Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension. /Users/liuxingqi/.rbenv/versions/1.9.3-p0/bin/ruby extconf.rb...

Cannot find openuri

ruby-on-rails,ruby,bundler,rbenv
I'm trying to run bundle install on my rails project (I've just added Nokogiri) but I ran into a permission error. I installed rbenv (which seems like the right way to go) to get around that problem but now I'm getting Could not find gem 'open-uri (>= 0) ruby' in...

Run “Bundle Install” w/o Installing a Specific Dependency Gem - Rails

ruby-on-rails,windows,rubygems,bundler,hiredis
I'm trying to run bundle on a Win machine for an existing app. One of the gems is using HiRedis as a dependency. Since it is impossible to install HiRedis on Win: Is there a way to find out which gem is using HiRedis? Is there a way to run...

OpenBSD unable to install therubyracer gem ERROR: Failed to build gem native extension

ruby-on-rails,ruby,rubygems,bundler,openbsd
I am trying host OpenSourceBilling application built using Ruby on Rails framework to OpenBSD server. When i try to install gems using bundle install command, I get following error on therubyracer gem installation: /usr/local/lib/ruby/gems/2.0/gems/libv8-3.16.14.7/ext/libv8/location.rb:50:in `configure': You have chosen to use the version of V8 found on your system (Libv8::Location::System::NotFoundError) and...

What does “shell out” or “shelling out” mean?

ruby,unix,bundler
As used in these examples, for instance: shell out to bundle from inside a command invoked by bundle exec or shell out to a Ruby command that is not part of your current bundle, http://bundler.io/man/bundle-exec.1.html or i'm shelling out to the heroku command in the rake task https://github.com/sstephenson/rbenv/issues/400...

Gemfile not found when running Cron job with Capistrano 3 and whenever gem

ruby-on-rails,capistrano,bundler,whenever
My cron job works fine on my local machine after running whenever -w, after deploy to my VPS, I get this error, release 20150415044915 doesn't exist. any idea? I looked at my crontab -e, the path also looks fine where 20150502114703 is the correct release: 0 1 * * 1...

Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension Linux Mint

ruby,ruby-on-rails-4,heroku,rubygems,bundler
While running bundle install i am getting the following error. Running on Linux Mint 17.0 Rails 4.0.2 Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension. /home/dubzero/.rvm/rubies/ruby-2.0.0-p643/bin/ruby extconf.rb checking for ffi_call() in -lffi... yes checking for ffi_prep_closure()... yes checking for ffi_raw_call()... yes checking for ffi_prep_raw_closure()... yes checking for rb_thread_blocking_region()... yes checking...

Install newer version of bundler with bundler

ruby,bundler
If I change the version of bundler required in a Gemfile, and then type bundle, I get Bundler could not find compatible versions for gem "bundler": In Gemfile: bundler (>= 1.10.2) ruby Current Bundler version: bundler (1.9.9) This Gemfile requires a different version of Bundler. Perhaps you need to update...

Bundle install: ERROR: Failed to build gem native extension. nio4r gem

ruby-on-rails,ruby,gem,rvm,bundler
I'm currently working on a project using: rvm 1.26.11 ruby 2.2.1p85 I tried to run bundle install but keep getting the following error: Gem::Ext::BuildError: ERROR: Failed to build gem native extension. and, following: An error occurred while installing nio4r (1.0.0), and Bundler cannot continue. Make sure that `gem install nio4r...

Bundle fails on the Server

ruby-on-rails,ruby-on-rails-4,gem,bundler
I am trying to run the Rails application on the server. But it does not seem to be running and throws up the following error Using jquery-rails 3.1.2 Gem::Ext::BuildError: ERROR: Failed to build gem native extension. /usr/local/rvm/rubies/ruby-2.2.0/bin/ruby -r ./siteconf20150202-30975-1vno3hv.rb extconf.rb checking for ruby/thread.h... yes checking for rb_thread_call_without_gvl() in ruby/thread.h... yes...

Cannot test my model tests

ruby,ruby-on-rails-4,testing,rake,bundler
I have tests in the folder: test/models/person/helper/age_calculator_test.rb These test should fail because of: assert_equal false, true they do fail when I run: bundle exec m test/models/person/helper/age_calculator_test.rb But when Im running: bundle exec m test/models These Tests are not run! What do I wrong? How can I test all of my...

bundle install fails because “No such file or directory”

ruby-on-rails,gem,capistrano,bundler
I'M trying to deploy with capistrano to a staging server. This command fails both on deploy and manually: cd .../apps/myapp/releases/20150205154326 && ( RVM_BIN_PATH=/usr/local/rvm/bin/ PATH=/usr/bin/git:$PATH /usr/local/rvm/bin/rvm default do bundle install --path .../apps/myapp/shared/bundle --without development test --deployment --quiet ) error: Git error: command 'git clone --no-checkout --quiet ".../apps/myapp/shared/bundle/ruby/2.1.0/cache/bundler/git/fog- 8836460df0e4c80347618efd3adda34209f0c6f7"...

pg gem install fails, cannot find libpq-fe.h header

centos,capistrano,bundler,pg,centos7
Whenever I run bundle install on my VPS (CentOS Linux release 7.0.1406 (Core)) I get an error when installing the pg gem. No pg_config... trying anyway. If building fails, please try again with --with-pg-config=/path/to/pg_config checking for libpq-fe.h... no Can't find the 'libpq-fe.h header *** extconf.rb failed *** Could not create...

Specify similar configuration in groups of a Gemfile

ruby-on-rails,ruby,git,bundler
We have a rails app in which we have split out apps into engines. Now we have many engines and all them have to either point to develop or master, something like gem 'a', :git => "https://github.com/abc/a.git", :branch => 'develop' gem 'b', :git => "https://github.com/abc/b.git", :branch => 'develop' gem 'c',...

Why is `bundle exec rails s` not the same as `rails s`?

ruby-on-rails,bundler
Despite answers like these: rails s or bundle exec rails s and blog posts like these: http://blog.wyeworks.com/2011/12/27/bundle-exec-rails-executes-bundler-setup-3-times/ which all seem to indicate you should simply run rails s rather than bundle exec rails s I still find that occasionally I can't simply run rails s. E.g. $ rails s Rails...

Can't seem to get Bundler to run properly on Rails App server using Capistrano to deploy

ruby-on-rails,ruby,passenger,bundler,capistrano3
I've been using Rails for a couple of months now and made a small app that I'm trying to deploy with Capistrano. The problem is that when I run $ cap production deploy the deployment appears to run correctly except for the following 3 errors: DEBUG [764d7f01] Running /usr/bin/env [...

Ruby/Gem/Bundler Caching my local gem files

ruby,gem,bundler
I'm working on a gem locally, referenced it using bundle config local.GEMNAME (this is confirmed by the printout of bundle install). However, unless I bump the version on the gem, I can't use the most up-to-date code. When errors occur in the old code, it references the file in the...

error while deploying diaspora on heroku Failed to install gems via Bundler

ruby-on-rails,heroku,gem,bundler,diaspora
i am trying to deploy diaspora on heroku but getting this error while deploying am using rails 4.1.8 with ruby 2.0.0 on ubuntu 14.04 I had tried bundle update but it doesn't worked..any solution..?? > [email protected]:~/diaspora$ git push -u heroku heroku:master > Counting objects: 132081, done. > Delta compression using...

Rails3 and Bundler 1.0.0

ruby-on-rails,ruby,ruby-on-rails-3,bundler
I've just spent the past two days going around and around in circles. I'm upgrading an app from Rails 2.3.12 to Rails 3.0.0. It's on ruby 1.9.3. I'm slowly working my way through the vendor/plugins and updating them to the relevant gems. My problem is this: when I try to...

How do I get Phusion Passenger to recognize the correct version of bundler?

ruby-on-rails,ruby,passenger,bundler,gemfile
First of all, I am a programming newbie and even more recent Ruby/Rails newbie. I have a site that I am trying to upload (http://suzyogi.com). Most of the pages are just HTML and CSS with a bit of jQuery, but I wanted to include a blog, so I built it...

Is there a way to have bundler automatically require gems without specifying them in the gemfile?

bundler
I am trying to get a custom rspec formatter to work across multiple projects that use bundler. Since I have installed the rspec formatter as a global gem, I was hoping that I would not need to add the gem to every project's gemfile. Is there a way to have...

How to get bundler to always pull latest commit from private gem repo

ruby-on-rails,ruby-on-rails-4,bundler
Is this possible force bunlder to always get the latest commit? Something like: gem "gemname", :git => "[email protected]:/username/gemname.git", ref: :force-latest...

LoadError: cannot load such file — bundler/audit/cli

ruby,bundler
When trying to bundle exec rake -T I get a bundler/audit/cli not found error. I can bundle install, without a problem. Any ideas why this is happening? I'm on an ubuntu 14.04 system, with rvm installed. $ bundle exec rake -T rake aborted! LoadError: cannot load such file -- bundler/audit/cli...