I published a sto...">

I do not want "rake install" to publish Rubygems

I run:

rake install

in a project built with bundle gem <project_name>

I published a stone for Rubygems. However, sometimes I am in a VPN and I do not want to rake installtry to publish a gem for Rubygems as well.

I just want it installed locally. How can i achieve this?

+5
source share
1 answer

The rake file created by the binder will not publish your gem when you run it rake install.

You are thinking about. rake releaseDo not forget what you can do rake -Tto view a list of all the tasks described.

$ bundle --version
Bundler version 1.0.21


$ bundle gem somegem
      create  somegem/Gemfile
      create  somegem/Rakefile
      create  somegem/.gitignore
      create  somegem/somegem.gemspec
      create  somegem/lib/somegem.rb
      create  somegem/lib/somegem/version.rb
Initializating git repo in /Users/joshuajcheek/deleteme/somegem


$ cd somegem
total 24
-rw-r--r--  1 staff    91B Feb 12 22:00 Gemfile
-rw-r--r--  1 staff    28B Feb 12 22:00 Rakefile
drwxr-xr-x  4 staff   136B Feb 12 22:00 lib/
-rw-r--r--  1 staff   793B Feb 12 22:00 somegem.gemspec


$ rake -T
rake build    # Build somegem-0.0.1.gem into the pkg directory
rake install  # Build and install somegem-0.0.1.gem into system gems
rake release  # Create tag v0.0.1 and build and push somegem-0.0.1.gem to Rubygems


$ mate . # removing TODOs from the .gemspec


$ rake install # notice this is not pushing to rubygems
somegem 0.0.1 built to pkg/somegem-0.0.1.gem
somegem (0.0.1) installed


$ gem list somegem

*** LOCAL GEMS ***

somegem (0.0.1)


$ gem search -r somegem # does not show up in rubygems list

*** REMOTE GEMS ***
+6
source

All Articles