bundler

How to install json gem - Failed to build gem native extension

和自甴很熟 提交于 2020-01-24 14:33:12
问题 I'm trying to deploy a rails app to my ubuntu linux server. I'm using capistrano and bundler and when it gets to installing gems it fails with this error: Installing json (1.7.7) with native extensions Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension. /opt/ruby-enterprise-1.8.7-2012.02/bin/ruby extconf.rb creating Makefile make /usr/bin/gcc -I. -I/opt/local/include -I/opt/ruby-enterprise-1.8.7- 2012.02/lib/ruby/1.8/i686-linux -I/opt/ruby-enterprise-1.8.7-2012

How to install json gem - Failed to build gem native extension

橙三吉。 提交于 2020-01-24 14:32:24
问题 I'm trying to deploy a rails app to my ubuntu linux server. I'm using capistrano and bundler and when it gets to installing gems it fails with this error: Installing json (1.7.7) with native extensions Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension. /opt/ruby-enterprise-1.8.7-2012.02/bin/ruby extconf.rb creating Makefile make /usr/bin/gcc -I. -I/opt/local/include -I/opt/ruby-enterprise-1.8.7- 2012.02/lib/ruby/1.8/i686-linux -I/opt/ruby-enterprise-1.8.7-2012

How to create interdependent gems with bundler, and use repositories as the source?

余生颓废 提交于 2020-01-24 05:41:58
问题 How is it possible to create interdependent gems, and still use Bundler? Right now, if the Gemfile for library-a reads like this: gem 'library-b' gem 'library-c' And the Gemfile for library-b reads like this: gem 'library-a' gem 'library-c' And the Gemfile for library-c reads: gem 'library-a', github: 'library-root/library-a', branch: 'master' gem 'library-b', github: 'library-root/library-b', branch: 'master' When you try to run bundle update and/or bundle install for library-c , this is the

How to change Bundler default version

↘锁芯ラ 提交于 2020-01-24 04:02:30
问题 bundler (2.0.1, default: 1.17.2) How could I change the default to 2.0.1 回答1: What helped me is to delete the current default manually from the folder lib\ruby\gems\2.6.0\specifications\default\ and then install fresh bundler as usually gem install bundler or as default gem install --default bundler 回答2: Following https://bundler.io/guides/bundler_2_upgrade.html#upgrading-applications-from-bundler-1-to-bundler-2, here's what worked for me: gem install --default bundler gem update --system

Why am I getting Permission denied error in deployment on files generated by capistrano?

陌路散爱 提交于 2020-01-24 01:05:20
问题 I was having a failed: "sh -c 'cd /var/www error. Then fixed it by adding the following in deploy.rb... set :default_environment, { 'PATH' => "/var/lib/gems/1.9.1/bin:$PATH" } Now I'm getting this new error. ** [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

'Could not find gem' error when specifying a forked version of a gem from Github in my gemfile

天涯浪子 提交于 2020-01-23 12:42:56
问题 I am trying to use this forked version of the searchlogic gem. In my gemfile, I have gem "searchlogic", :git => "http://github.com/railsdog/searchlogic.git" when I do bundle install , I get this error: Could not find gem 'searchlogic (>= 0, runtime)' in http://github.com/railsdog/searchlogic.git (at master). Source does not contain any versions of 'searchlogic (>= 0, runtime)' What is causing this error? Thanks for reading. 回答1: It's because your fork not define searchlogic gem by rd

'Could not find gem' error when specifying a forked version of a gem from Github in my gemfile

拈花ヽ惹草 提交于 2020-01-23 12:42:29
问题 I am trying to use this forked version of the searchlogic gem. In my gemfile, I have gem "searchlogic", :git => "http://github.com/railsdog/searchlogic.git" when I do bundle install , I get this error: Could not find gem 'searchlogic (>= 0, runtime)' in http://github.com/railsdog/searchlogic.git (at master). Source does not contain any versions of 'searchlogic (>= 0, runtime)' What is causing this error? Thanks for reading. 回答1: It's because your fork not define searchlogic gem by rd

What does bundle install --without production do?

余生颓废 提交于 2020-01-22 19:59:07
问题 Ive seen people using this and used it myself as told to do so. I just dont have a real grasp as what it actually does. I understand fully the bundle install part, but not the --without production part of it. What does this do and why would I want to use it? 回答1: If you have a group inside your Gemfile like group :production do gem 'whatever' end Then when you run your bundle command on your development machine, it won't install the gems intended for use in your production environment.

Bundler with Capistrano doesn't generate a binary for DelayedJob

放肆的年华 提交于 2020-01-22 19:39:38
问题 I'm using Bundler for a Rails app deployed by Capistrano. I'm trying to add the DelayedJob gem, but the bin/delayed_job file is missing from the remote server after I do a deploy. It exists on my local machine. I tried manually creating it with bundle binstubs delayed_job but it fails with: There are no executables for the gem delayed_job. What am I missing here? The gems in question are: Bundler 1.3.5, Capistrano 3.1.0, DelayedJob 4.0.0, Rails 4.0.2 EDIT: Here is my full Gemfile: http:/

Telling Bundler to exclude certain gems from a particular gem's installation

China☆狼群 提交于 2020-01-21 03:32:06
问题 Within a gemfile, is there any way to tell Bundler something like: gem 'twitter-bootstrap-rails', :exclude therubyracer I need to install twitter-bootstrap-rails but it automatically pulls therubyracer in, so bundle install fails and bootstrap isn't included in the project since this is a Windows machine. I installed execjs to no avail. I tried to list therubyracer under production, and bundle install --without production , also to no avail. "therubyracer gem on windows" is also this problem,