Giter Site home page Giter Site logo

Comments (3)

dadooda avatar dadooda commented on May 18, 2024 2

Hey @tiagoamaro,

$ BUNDLE_GEMFILE=Gemfile.local bundle install

It's b install if you use bundler-gemlocal. Times shorter and foolproof.

$ BUNDLE_GEMFILE=Gemfile.local bundle exec rake -T

It's bx rake -T if you use bundler-gemlocal.

Also, keep in mind that your command will only work if the command is typed while standing next to Gemfile.local. If, for instance, you cd to app/models of your project, you'll have to uglify your command like this: $ BUNDLE_GEMFILE=../../Gemfile.local bundle ....

It's sad Bundler doesn't support local Gemfile out of the box. Most teams need it even if they don't realize it yet. Let's hope for the best. Until then, may the Hack be with us. :)

Cheers!

from gemfile.local.

dadooda avatar dadooda commented on May 18, 2024

Hey Gerry,

Check out a working solution for a local Gemfile, in case you're interested: https://github.com/dadooda/bundler-gemlocal.

Cheers!

Alex

from gemfile.local.

tiagoamaro avatar tiagoamaro commented on May 18, 2024

@dadooda, thanks for your solution. Based on yours and @gerrywastaken's, I was able to create a Gemfile.local only using bundler and its embedded features, using environment variables to configure a different Gemfile [1]. Here's the solution:

# Gemfile.local

eval_gemfile File.expand_path('./Gemfile') # [2]

# Add any gems and groups that you don't want to keep local
group :development do
  gem 'pry'
end
# Using BUNDLE_GEMFILE
$ BUNDLE_GEMFILE=Gemfile.local bundle install
$ BUNDLE_GEMFILE=Gemfile.local bundle exec rake -T

[1] http://www.schneems.com/post/59689229829/specify-different-gemfile-while-using-bundler/
[2] only using eval as @gerrywastaken introduced on this repository raised exceptions. This was solved by @dadooda's usage of Bundler's eval_gemfile method.

from gemfile.local.

Related Issues (1)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.