I would like to install gem from the latest GitHub source.
How do I do this?
In the console be located in the gems cache (cd [Ruby Installation version]/lib/ruby/gems/[Ruby version]/cache ) and fire the gem install anygemwithdependencieshere (by example cucumber-2.99. 0 )
Use `gem install -v` You may already be familiar with gem install , but if you add the -v flag, you can specify the version of the gem to install. Using -v you can specify an exact version or use version comparators.
well, that depends on the project in question. Some projects have a *.gemspec file in their root directory. In that case, it would be
gem build GEMNAME.gemspec gem install gemname-version.gem
Other projects have a rake task, called "gem" or "build" or something like that, in this case you have to invoke "rake ", but that depends on the project.
In both cases you have to download the source.
In case you are using bundler, you need to add something like this to your Gemfile:
gem 'redcarpet', :git => 'git://github.com/tanoku/redcarpet.git'
And in case there is .gemspec
file, it should be able to fetch and install the gem when running bundle install
.
UPD. As indicated in comments, for Bundler to function properly you also need to add the following to config.ru
:
require "bundler" Bundler.setup(:default)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With