bundler

Is it possible to require files outside the Gemfile?

老子叫甜甜 提交于 2020-01-13 13:08:42
问题 For example, I'm developing a gem, and while I'm developing, I use pry instead of IRB, and debugger for debugging. However, I don't want possible contributors to have to install them (because they may not need them). My first idea was to put them in a Bundler group: source :rubygems gemspec group :extras do gem "pry" gem "debugger" end And then people could use: $ bundle install --without extras But I want it to be a default that they're not installed. What would be perfect is that they're

Push to Heroku fails: Could not find net-ssh-2.10.0 in any of the sources. Failed to install gems via Bundler

ε祈祈猫儿з 提交于 2020-01-13 09:19:33
问题 I tried pushing my app to heroku but get the following error: remote: -----> Using Ruby version: ruby-2.2.2 remote: -----> Installing dependencies using 1.9.7 remote: Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment remote: Fetching gem metadata from https://rubygems.org/........... remote: Fetching version metadata from https://rubygems.org/... remote: Fetching dependency metadata from https://rubygems.org/.. remote: Could

Rails Gemfile defaults to 'https' - 'bundle install' fails

烂漫一生 提交于 2020-01-12 10:16:11
问题 I've noticed that when generating a new rails project, the Gemfile now defaults to: source 'https://rubygems.org' instead of source 'http://rubygems.org' and now bundle install fails for me. When it attempts to run, I get: /Users/<my user name>/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/net/http.rb:799: [BUG] Segmentation fault If I manually change the Gemfile to http , then bundle install performs fine. Is there an error with my setup (I've replicated this on two different boxes), or is there

Call a rubygem's binary executable from inside my rails applications?

不羁岁月 提交于 2020-01-07 05:10:11
问题 I know that bundler makes a gems executables available using the bundle exec command. I want to understand how I can call these executables from inside a controller action or model class method? I don't see anything about this in the Bundler doco. 回答1: Executables are ruby scripts sitting in the bin directory of the gems and their behavior depend on each gem. They are wrappers around the gems classes/APIs: simply dig into the source code of the gems you target and mimic the behavior of their

Bundle install error when deploying via capistrano (& rvm)

北城以北 提交于 2020-01-07 04:32:10
问题 Now I must admit that I'm stumbling around in the dark a little bit as far as this deployment lark is concerned. I'll try and explain the situation best I can; I have set up a test deployment server and am trying to deploy my app to it with capistrano, however, I am encountering some difficulties surrounding my gems and their dependencies, as the error below shoes. [mike-test] executing command [mike-test] rvm_path=$HOME/.rvm/ $HOME/.rvm/bin/rvm-shell '1.9.3' -c 'cd /home/deploy/myapp

Bundler in deployment mode does not find Gems

有些话、适合烂在心里 提交于 2020-01-06 19:49:13
问题 I was heavily struggling with my Capistrano Setup, when my Hoster migrated the server: Capistrano3 deploy fails after migrating the server One thing I ran into that used to work just fine on the old machine and now seems to be a mess is bundler: I could successfully run bundler through Capistrano: cap staging bundler:install This resulted in the following command on the server /usr/bin/env bundle install --binstubs \ /var/www/mydomain.com/subdomains/dev/shared/bin \ --path /var/www/mydomain

rails 5.0.1 already initialized

偶尔善良 提交于 2020-01-06 06:55:19
问题 I tried to generate a user but it appears this error, if i give a rails s the same error appears, i cant do anything, i gave a bundle update , a bundle install in the gems and nothing changes. I changed the version of rails in the GEMFILE of 4.6.2 to 5.0.1 and gave a bundle update . I wanted to work with version 5 , but i dont know how to update, i saw a tutorial that said i could do it like this, so i did, only now this error appears. root@ubuntu:~/Projeto-video-3# rails model User name

rails 5.0.1 already initialized

安稳与你 提交于 2020-01-06 06:55:08
问题 I tried to generate a user but it appears this error, if i give a rails s the same error appears, i cant do anything, i gave a bundle update , a bundle install in the gems and nothing changes. I changed the version of rails in the GEMFILE of 4.6.2 to 5.0.1 and gave a bundle update . I wanted to work with version 5 , but i dont know how to update, i saw a tutorial that said i could do it like this, so i did, only now this error appears. root@ubuntu:~/Projeto-video-3# rails model User name

When using `bundle gem floob`, why is a directory of the same name as the gem is created?

血红的双手。 提交于 2020-01-06 06:07:47
问题 I am making my first gem. Let's assumed it is called floob . ex: bundle gem floob Why would bundle gem create two directories of the same name for a gem? ex: /floob/lib/floob/ Do I put the bulk of my code in /lib/floob/ (alongside the version.rb file?) What is the purpose of the file that is created with the gem name? ex: /floob/lib/floob.rb The only command run was bundle gem . I would love a little clarification on what the relationship is between all the floobs ~ 回答1: The reason for this

Gem::LoadError when using a git repo in Gemfile

此生再无相见时 提交于 2020-01-05 15:06:09
问题 I forked the sinbook gem and added the git repo to my Gemfile. But the sinatra-authentication gem, which depends on sinbook, throws Gem::LoadError. Why isn't my version of the gem being used? Gemfile source :rubygems gem 'sinatra' gem 'sinatra-contrib' gem 'sequel' gem 'jruby-openssl' gem 'rack-flash' gem 'sinbook', git: 'https://github.com/JamesGecko/sinbook' gem 'sinatra-authentication' gem 'json-jruby' gem 'coffee-script' gem 'therubyrhino' error PS C:\users\james\code\portal> jruby -S