Reputation: 17185
I am joining a Ruby project and I was given a GitHub url for the gemfile. I copied and pasted the gemfile to the root of my ruby setup.
What I wasn't sure about was what the extension of the gemfile should be. Should it be "name.rb" ?
And also what I am confused about is the command I should use. I googled around for the right syntax, but got confused what the syntax should be to use the bundler to create the application from the gemfile that I have.
Advice much appreciated!
Upvotes: 1
Views: 3112
Reputation: 2294
The Gemfile should be saved without an extension.
Bundler has many different commands you can use, but it sounds like you are interested in how to get Bundler to install all of the project dependencies. From the Bundler documentation:
bundle install
Install the gems specified by the
Gemfile
orGemfile.lock
Since a Gemfile is evaluated as Ruby code it is possible to save it with an extension of .rb
. However, Bundler will not automatically find it if you do. If for some reason you do need to save it with a .rb
extension this answer shows how it is possible.
Upvotes: 3