en6in33r
en6in33r

Reputation: 266

Running a forked repo

I'm attempting to fork the repo and run it locally. Steps I took so far are:

  1. Download repo
  2. Change gemname gem version in version.rb to 1.4.0 because version is not available
  3. Uninstall and reinstall bundler to version 1.6.1
  4. Run bundle install
  5. Get the error Make sure that gem install gemname -v '1.4' succeeds before bundling.
  6. Run gem install gemname -v '1.4' and installed gem successfully
  7. Run bundle install and I loop back to the error on step 5

I clearly have surveyor installed but yet bundler doesn't seem to recognize this. I'm a novice and very rusty on Rails.

Thanks in advance for your help!

Upvotes: 0

Views: 162

Answers (1)

Schwern
Schwern

Reputation: 165004

To depend on a version of a gem in a Git repo, tell the bundler to fetch the gem from the repo.

gem 'surveyor', '~> 1.4', git: 'https://github.com/scwong93/surveyor/'

And then run bundle as normal. You should see...

Using surveyor 1.4.1.q from https://github.com/scwong93/surveyor/ (at master@e253789)

Look inside your Gemfile.lock and see that it has indeed found the repo version 1.4.1q by pulling it from the repo's master branch.

GIT
  remote: https://github.com/scwong93/surveyor/
  revision: e25378983fd465db701610eb076179c74db98c11
  specs:
    surveyor (1.4.1.q)
      formtastic (~> 2.2.1)
      haml (>= 4.1.0.beta.1)
      mustache (~> 0.99)
      rabl (~> 0.6)
      rails (>= 3.2)
      sass
      uuidtools (~> 2.1)

Upvotes: 1

Related Questions