johanserik
johanserik

Reputation: 41

The Cucumber book : Could not locate gemfile

I'm reading "The cucumber book" and at page 143 it is given an example of "bundle exec ruby lib/nice_bank.rb"

This gives me an errormessage of could not locate gemfile.

I have searched up and down, but can't find it anywhere manually.

I then did the following command in the Console: gem list

And then I get a list of many installed gems, including cucumber, sinatra and capybara, which is listed as the ones I require to use.

I've read some of the issues regarding this, and most refers to that it is located in the root of ruby installation, but it is not. Only directories I have in Ruby193 is:

And this is the path to where I have my features and step definitions: C:\Ruby193\lib\Cucumber\ATM\features\step_definitions

And this is the errormessage I get when running the example: C:\Ruby193\lib\Cucumber\ATM>bundle exec ruby lib/nice_bank.rb Could not locate Gemfile

So, does anyone knows where it is? (I've checked hidden folders options).

Upvotes: 0

Views: 640

Answers (1)

orde
orde

Reputation: 5273

You'll have to create the Gemfile. Go to the root directory for your project and run from console (assuming bundler isn't installed yet):

gem install bundler
bundler init

This will create a Gemfile for you, and you can specify the gems (and versions) in that file. For more details, check out the bundler site.

Upvotes: 1

Related Questions