Comments (8)
please test with:
gem install rubygems-bundler --pre
NOEXEC=0 rails new app
It will basically not load Gemfile
from current directory to use rails, and everything will work correctly, I have added a test case for it: https://github.com/mpapis/rubygems-bundler/blob/1.0.0/test/dtf/rails_and_gemfile_comment_test.sh
from rubygems-bundler.
Good thanks!
I installed
$ gem install rubygems-bundler --pre ( 1.0.0 beta5 )
which prompted me to
$ gem uninstall -ax rubygems-bundler -v 0.9.2
next, I reset my .gemrc to include
custom_shebang: $env ruby_noexec_wrapper
and then I reset my wrappers with
$ gem regenerate_binstubs
Now, the result:
$ rails new app # => no Gemfile.lock
$ NOEXEC=0 rails new app # => Gemfile.lock created
from rubygems-bundler.
you do not need the .gemrc
part anymore:
custom_shebang: $env ruby_noexec_wrapper
this is now automated.
from rubygems-bundler.
Wow! --- better and better!
from rubygems-bundler.
How I discovered it:
I am running with .railsrc set to --skip-bundle and -m pointing to my template generator.
My template generator builds the Gemfile, then runs bundle, and finally runs further generators in the app.
Now, with a global NOEXEC=0, won't these generators need a bundle exec prefix in my template?
from rubygems-bundler.
I'm not sure at all, basically after the directory is changed to the new project dir you could do one of this two things:
unset NOEXEC
NOEXEC=1
from rubygems-bundler.
my script starts off like this...
## check env for NOEXEC=0
unless ENV[ 'NOEXEC' ] == '0'
say '==> please set NOEXEC=0 to run this script'
exit
end
# great, now unset it.
ENV[ 'NOEXEC' ] = nil
looks clumsy, but it works
from rubygems-bundler.
this made me laugh, maybe better add a comment explaining it is needed because of calling rails in context of wrong Gemfile, I would drop the code first time I would see it in my project
from rubygems-bundler.
Related Issues (20)
- Extract hooking up into executables as a separate gem HOT 2
- rubygems-bundler binstubs do not activate older versions of gems HOT 8
- cannot run gem from default environment inside directory with deployed gems HOT 1
- add a global variable to ignore executables HOT 1
- "Unresolved specs" warning with Ruby 2.0.0-p247 and rubygems 2.0.3 HOT 9
- Could not find 'rubygems-bundler' (>= 0) HOT 4
- License missing from gemspec HOT 4
- Unable to execute tmuxinator without "bundle exec" HOT 7
- Psych double loading problem with version > 1.1.0: psych.rb: warning: already initialized constant VERSION HOT 2
- rubygems-bundler-uninstaller fails weirdly HOT 3
- error when running rake db:drop HOT 1
- Breaking the spring gem HOT 6
- rubygems-bundler-uninstaller: command not found HOT 17
- NoMethodError - undefined `name' for #<Array> HOT 1
- Gem::use_gemdeps HOT 5
- Git repo not being loaded HOT 2
- /usr/bin/env: ‘ruby_executable_hooks’: No such file or directory on Heroku after removing this gem
- Broken with Ruby 2.7.0-preview2 HOT 1
- Error when use bundler v2.1.0 HOT 3
- Homepage returns a 404
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 rubygems-bundler.