Questions tagged [gemfile]

Gemfile - A format for describing gem dependencies for Ruby programs. A Gemfile describes the gem dependencies required to execute associated Ruby code.

Gemfiles are a format for describing what gems are required by a Ruby program in order to successfully run.

See also

712 questions
6
votes
1 answer

Python equivalent of a ruby Gem file

So I have a ruby sinatra program that runs on a server and I have a Gem file to ensure all its dependancies are installed. However it calls a python script which has its own python module dependancies. Thus when it deploy to server all the ruby gems…
Richard
  • 239
  • 1
  • 3
  • 14
6
votes
2 answers

Is It Possible To Have One Group Inherit From Another In A Gemfile

If I have a series of gems that are needed in multiple groups, can I have groups inherit from a base group? I know I can do: gem "example", {:groups=>[:group_1, :group_2]} Or: group :group_1, :group_2 do gem "example" end But is there a way to…
Undistraction
  • 42,754
  • 56
  • 195
  • 331
5
votes
3 answers

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

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…
easyjo
  • 734
  • 6
  • 16
5
votes
2 answers

Cannot install gems with bundle

I am spinning a docker container(alpine base) from a docker file inside a Jenkins pipeline. The container installs: ruby-rake and ruby-bundler and I am able to do bundle with no problem My working directory in this jenkins pipeline has Gemfile and…
David
  • 1,469
  • 5
  • 33
  • 51
5
votes
3 answers

Environment variable in Gemfile

I'm having trouble using an environment variable in my Gemfile. I'm trying to load a gem from a private Github repository with an API key: auth = ENV['SECRET_GIT'] gem 'foobar', git: "https://#{auth}:x-oauth-basic@github.com/Foo/Bar.git" But if I…
Francois
  • 1,367
  • 1
  • 15
  • 23
5
votes
2 answers

How do I check all the gems with its versions in my Rails project?

When I go with gem list from my app folder, the terminal displays the list of all gems installed on my local machine. I want instead to see the project related gems.
5
votes
1 answer

Error upgrading from Rails 3.2.22 to Rails 4.2.4

I am trying to upgrade our app from Rails 3.2.22 to Rails 4.2.4 with Ruby 2.2.3. Here's what I've done so far: Modified Gemfile to specify rails, "~> 4.2.4" bundle bundle update rails The full transcript is below. ActiveRecord is not specified in…
Craig Treptow
  • 834
  • 7
  • 19
5
votes
2 answers

You have already activated rack 1.6.0, but your Gemfile requires rack 1.6.4. Prepending `bundle exec` to your command may solve this. (Gem::LoadError)

I'm working with Elastic Beanstalk and I'm getting this error in my logs- You have already activated rack 1.6.0, but your Gemfile requires rack 1.6.4. Prepending bundle exec to your command may solve this. (Gem::LoadError) I've seen all related…
5
votes
1 answer

ssl_verify_mode + bundler + geminabox

I'm trying to set up a private geminabox server to hold some gems my project is developing. I have the server set up, with passenger nginx running geminabox as a rack app. I am able to bundle install pointing at the server without using SSL. Since…
phlogiston
  • 331
  • 5
  • 10
5
votes
3 answers

rbenv Your Ruby version is 2.0.0, but your Gemfile specified 2.1.2

I'm using rbenv and I have the follow error when I execute rails s Your Ruby version is 2.0.0, but your Gemfile specified 2.1.2 I was reading this thread: Mavericks, RBENV, Your Ruby version is 2.0.0, but your Gemfile specified 2.1.1 But the error…
Benjamin RD
  • 11,516
  • 14
  • 87
  • 157
5
votes
1 answer

Rails says json 1.8.1 is missing even though its listed during bundle install

I did rails new awesomeapp then when I go to do rails s, I get an error that json-1.8.1 is missing. But when I do bundle install, it's clearly listed. What am I missing? Donalds-MacBook-Pro:awesomeapp · rails s Could not find json-1.8.1 in any of…
Don P
  • 60,113
  • 114
  • 300
  • 432
5
votes
2 answers

Can I specify ruby version with patchlevel in Gemfile?

Bundler documentation for version 1.5 says that I should specify patchlevel as follows: ruby '1.9.3', :patchlevel => 448 When I follow the instruction and run bundle install, I get: The Ruby patchlevel in your Gemfile must be a string If I do ruby…
Ivan Zamylin
  • 1,708
  • 2
  • 19
  • 35
5
votes
2 answers

RubyMine doesn't recognize gem from git repository

We have a git repository with a custom gem. To install it Gemfile has a line: gem 'my-gem', :git => 'git@192.168.1.100:my-gem.git' After installing the gem, it is not shown in RubyMine`s External Libraries. How to make the gem be shown in External…
5
votes
1 answer

Updating Gemfile from Gemfile.lock, to freeze gems

After generating a Gemfile.lock from Gemfile, is there any tool to round-trip back to freeze versions in the Gemfile. I'd rather avoid doing it manually. Background: It's good practice to freeze minor version on gems, e.g. if Gemfile.lock is 2.4.1,…
mahemoff
  • 44,526
  • 36
  • 160
  • 222
5
votes
2 answers

proper way to specify optional dependencies of a gem in ruby Gemfile

a gem intends to support gems a or b as alternatives for a functionality. In code I check with defined?(A) if I fall back to b that's fine. But as a gem developer how to specify these dependencies? 1) what do I put in the Gemfile. group…
Viktor Trón
  • 8,774
  • 4
  • 45
  • 48