Comments (3)
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.
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.
@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 usingeval
as @gerrywastaken introduced on this repository raised exceptions. This was solved by @dadooda's usage of Bundler'seval_gemfile
method.
from gemfile.local.
Related Issues (1)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gemfile.local.