Use bundle install --standalone
Create a gem project
$ bundle gem awesome-cmd -b
create awesome-cmd/Gemfile
create awesome-cmd/Rakefile
create awesome-cmd/LICENSE
create awesome-cmd/README.md
create awesome-cmd/.gitignore
create awesome-cmd/awesome-cmd.gemspec
create awesome-cmd/lib/awesome-cmd.rb
create awesome-cmd/lib/awesome-cmd/version.rb
create awesome-cmd/bin/awesome-cmd
Initializating git repo in /path/to/awesome-cmd
Run bundle install standalone
$ cd awesome-cmd
$ vi awesome-cmd.gemspec # add gem e.g. 'thor'
$ bundle install --standalone
Fetching gem metadata from https://rubygems.org/..
Installing thor (0.15.4)
Using awesome-cmd (0.0.1) from source at /path/to/awesome-cmd
Using bundler (1.1.4)
Your bundle is complete! It was installed into ./bundle
Use ruby
instead of bundle exec
$ ruby -r ./bundle/bundler/setup.rb ./bin/awesome-cmd --version
0.0.1
Written by Tomohiro TAIRA
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Ruby
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#