Skip to content
This repository has been archived by the owner on Dec 26, 2017. It is now read-only.

Instructions for using 1.4.0 dev or other newer builds? #111

Closed
jmahowald opened this issue Oct 28, 2013 · 8 comments
Closed

Instructions for using 1.4.0 dev or other newer builds? #111

jmahowald opened this issue Oct 28, 2013 · 8 comments

Comments

@jmahowald
Copy link

I'm introducing berkshelf and we needed the mercurial support that is available in the 3.0 beta releases of berkshelf. Given that vagrant has it's own plugin system, I haven't yet figured out how to use your "pre release" versions of this plugin. Is there a way outside of telling everyone to use bundler?

@johntdyer
Copy link
Contributor

Check out hashicorp/vagrant#1461 .  I think that's what you're looking for. 

@tmatilai
Copy link
Contributor

Yes, you can either install pre-release versions from rubygems.org (or any other ruby repository), or install directly from the git repository. I have put instructions here.

@sethvargo
Copy link
Contributor

@jmahowald please see @johntdyer and @tmatilai's comments for proposed solutions.

@jmahowald
Copy link
Author

Thanks. Those helped. Since I had to figure some other bits out, thought I'd share in case anyone (like in #102) wanted to try this out.

To build the gem I did

Using bundler I did

bundle exec thor gem:build

Since it's in pre release, I couldn't use gem server, but instead used Gem in a Box. I ran into an issue, that I fixed by reading this thread (geminabox/geminabox#128).

After doing that, I was able to install it running:

vagrant plugin install --plugin-source http://localhost:9292  --plugin-prerelease vagrant-berkshelf

One more step that I had to do, because of issues with the cacerts in the embedded ruby in the vagrant omnibus installation not liking the ssl cert chain used at https://api.berkshelf.com.

brew install curl-ca-bundle
export SSL_CERT_FILE='/usr/local/opt/curl-ca-bundle/share/ca-bundle.crt'

HT (berkshelf/berkshelf#378 (comment))

@tmatilai
Copy link
Contributor

Ah, sorry. I totally forgot this uses Thor instead of Rake...

There shouldn't be need for any gem server. Allowing pre-release dependencies (until Berkshelf 3.0 is released) and explicitely using rubygems.org (until hashicorp/vagrant#2406 is resolved) should be enough:

bundle
bundle exec thor gem:build
vagrant plugin install --plugin-prerelease --plugin-source https://rubygems.org pkg/vagrant-berkshelf-1.4.0.dev.gem

@merqlove
Copy link

merqlove commented Nov 1, 2013

Excellent)

@moleculezz
Copy link

Hi @tmatilai, where exactly am I suppose to run these commands?

@tmatilai
Copy link
Contributor

@moleculezz In the cloned git repository. Bad and good news:

  • You most probably need to build and install also the berkshelf gem from master.
  • You don't even need thor.
git clone https://github.com/berkshelf/berkshelf.git
cd berkshelf
gem build berkshelf.gemspec
gem install berkshelf-*.gem --conservative --no-ri --no-rdoc --install-dir $HOME/.vagrant.d/gems
cd ..

git clone https://github.com/berkshelf/vagrant-berkshelf.git
cd vagrant-berkshelf
gem build vagrant-berkshelf.gemspec
vagrant plugin install vagrant-berkshelf-*.gem

In above commands it's possible to also use Vagrant's embedded gem:

  • OS X: /Applications/Vagrant/embedded/bin/gem
  • Linux: /opt/vagrant/embedded/bin/gem
  • Windows: C:\HashiCorp\Vagrant\embedded\bin\gem

(Instructions as a gist)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants