Gems not found by gem list when using bundle install for git gems with RVM

I am currently trying to run 'bundle install' to install the git gem using the Gemfile and therefore use ruby ​​/ other ruby ​​commands without a package with the latest version of RVM (1.14.3).

I believe the cause of the problem is that the binder sets the git pearl to .rvm / gems / ruby-1.9.3-p194 @ something / bundler / gems, and all other gems are set to .rvm / gems / ruby-1.9.3-p194@something / gems. As a result, the "list of packages" shows a gem, but the "list of gems" does not work.

Any thoughts here? I would prefer not to use the package to accomplish everything.

+4
source share
1 answer

Bundler is designed to link gems with applications. It makes no sense to use it for systemic gems. Unfortunately, the gem non-bundler system does not offer a direct way to install git gems (I really asked a question about this earlier, see Is it possible to directly install a gem from a git repository? ). Instead, you must do this manually in three steps:

  • Cloning the gem repository (assuming it's a github repository, but it will work for a repository hosted anywhere, just replace the correct git repo location).

    git clone git://github.com/user/gem.git 
  • Go to the cloned gem repo directory and create a gem (it will also check for dependencies and warn you if the installation failed due to a missing dependency - in this case, just install the dependencies and try again).

     rake gem 

    Or if this does not work:

     gem build gem.gemspec 
  • This was to create a file with a name like pkg/gem-1.2.3.gem (sometimes it will be built in the pkg directory, like this, sometimes it will be built in the gem repo root directory). Now you can install it.

     gem install pkg/gem-1.2.3.gem 
+6
source

All Articles