Could not locate Gemfile

I just downloaded RubyMine and I'm trying to use it on a very simple project. In my project folder there is currently a Gemfile,  
a Gemfile.lock and my one app.rb file. The app.rb file is very simple:

require 'bundler'

API_TOKEN = 'xxxxxxxxxx'
PROJECT_ID = xxxxx

PivotalTracker::Client.token = API_TOKEN
PivotalTracker::Client.use_ssl = true
@all_tracker_projects = PivotalTracker::Project.all
@tracker_project = PivotalTracker::Project.find(PROJECT_ID)
@activity = PivotalTracker::Activity.all
@stories = @tracker_project.stories.all
@activities = @tracker_project.activities.all

puts 'Awesome!'

When I run this from the command line it works just fine. When I try to run it from RubyMine as either regular or debug it throws a Could not locate Gemfile error.
Any suggestions are greatly appreciated

Comment actions Permalink

Hi Robert,

it looks like some very important, but tiny detail is missing in your description :(
I've created simmilar small project with Gemfile and app.rb and it works (both files are
located in the root directory of the project).
I'm using RM-4.0.2 + ruby 1.9.3 on Windows.

What version of ruby do you use? On which platform?
Perhaps you could provide the problematic project (it looks like the forum supports attachments)

Regards, Oleg.

Comment actions Permalink

Yep I'm attaching the project.

I just did rvm get latest which has me at rvm 1.11.3 on Mac OS Lion.
Ruby version is 1.9.3 and I have a gemset I created called pivotal which has all the dependencies installed into it.

Comment actions Permalink

Hi Robert,

I think the problem is in the "working directory" your project is using.
The "Pivotal" configuration has empty working directory specified which means the directory where the ruby executable is located.
If you will specify the directory where you app.rb/Gemfile are located everything should work.

Hope this helps.

Regards, Oleg.


Please sign in to leave a comment.