Running VMC on Mountain Lion - osx-mountain-lion

I've followed the simple instructions for installing VMC on Mountain Lion (sudo gem install vmc), but I'm getting the following error:
$ vmc
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:230:in `activate': can't activate multi_json (~> 1.4.0, runtime) for ["vmc-0.4.7"], already activated multi_json-1.5.0 for ["cfoundry-0.4.19", "vmc-0.4.7"] (Gem::LoadError)
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:246:in `activate'
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:245:in `each'
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:245:in `activate'
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:1056:in `gem'
from /usr/bin/vmc:18
Can anyone help me with diagnosing this? Is this an issue with the version of Ruby installed? I don't really want to blindly jump through hoops to upgrade Ruby for this one thing. I tried installing an older version of multi-json with gem install multi_json -v 1.4.0, but this didn't seem to make any difference.

Seems like vmc is picking multi_json (one of its dependencies) with version 1.5, which is not compatible with 1.4
What you can do is sudo gem uninstall multi_json and when prompted, answer to have version 1.5 removed.

Related

Jekyll version questions

If I run jekyll -v in terminal, I got this:
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/universal-darwin19/rbconfig.rb:229: warning: Insecure world writable dir /usr/local/opt in PATH, mode 040777
jekyll 4.1.0
But if I run gem list jekyll, it says I have another version of jekyll:
*** LOCAL GEMS ***
jekyll (2.4.0)
jekyll-coffeescript (1.2.2)
jekyll-gist (1.5.0)
jekyll-paginate (1.1.0)
jekyll-sass-converter (1.5.2)
jekyll-watch (1.5.1)
Does it mean I have two different versions of Jekyll installed? and how can I choose to use the old version 2.4.0? and is it possible to uninstall the 4.1.0?
Thanks
I am answering both of your questions:
How can I choose to use the old version 2.4.0?
So, it is actually done through Gemfile in the project. Just mention gem 'jekyll', '2.4.0' in your Gemfile.
Is it possible to uninstall the 4.1.0?
Yes. Run gem uninstall Jekyll --version 4.1.0

I get errors when I run "bundle install" on zsh

I'm having an error messages with trying to run "bundle install". My ruby version is 2.2.0. Also, I installed it with rvm and did an "rvm use" command to change it from 2.4.0 to 2.2.0 because I thought it might fix the error. Anyway I need your help. Much appreciated.
I currently have 3 versions of ruby : 2.2.3, 2.2.0, 2.4.0
My OS MAC OS Sierra 10.12.3
My shell is zsh.
/Users/root/.rvm/rubies/ruby-2.2.3/lib/ruby/site_ruby/2.2.0/rubygems.rb:270:in `find_spec_for_exe': can't find gem bundler (>= 0.a) (Gem::GemNotFoundException)
from /Users/root/.rvm/rubies/ruby-2.2.3/lib/ruby/site_ruby/2.2.0/rubygems.rb:298:in `activate_bin_path'
from /usr/local/bin/bundle:22:in `<main>'
from /Users/root/.rvm/gems/ruby-2.2.3/bin/ruby_executable_hooks:15:in `eval'
from /Users/root/.rvm/gems/ruby-2.2.3/bin/ruby_executable_hooks:15:in `<main>'
It seems you have not installed gem bundler. Try:
gem install bundler
then bundle install again.
Not exactly sure what the issue was. But going into my .gemrc file and deleting
install: "--user --no-document"
update: "--user --no-document"
solved the problem

Cocoapod error right after installing successfully

I installed CocoaPods :
retine:MacOS jdmuys$ sudo gem install cocoapods
[...]
Successfully installed cocoapods-0.29.0
1 gem installed
Installing ri documentation for cocoapods-0.29.0...
Installing RDoc documentation for cocoapods-0.29.0...
However, it doesn't seem to work:
retine:MacOS jdmuys$ pod --version
/Users/jdmuys/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/1.9.1/rubygems/dependency.rb:247:in `to_specs': Could not find cocoapods (>= 0) amongst [addressable-2.3.2, bundler-1.2.3, chunky_png-1.2.6, compass-0.11.7, cookiejar-0.3.0, daemons-1.1.9, em-http-request-1.0.3, em-socksify-0.2.1, erubis-2.7.0, eventmachine-1.0.0, extlib-0.9.15, fssm-0.2.9, haml-3.1.7, http_parser.rb-0.5.3, json_pure-1.4.6, rack-1.4.1, rake-10.0.3, rubygems-bundler-1.1.0, rvm-1.11.3.5, sass-3.1.21, sproutcore-1.9.1, thin-1.2.11, thor-0.14.6] (Gem::LoadError)
from /Users/jdmuys/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/1.9.1/rubygems/dependency.rb:256:in `to_spec'
from /Users/jdmuys/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/1.9.1/rubygems.rb:1231:in `gem'
from /Users/jdmuys/.rvm/rubies/ruby-1.9.3-p327/bin/pod:22:in `<main>'
FWIW:
retine:MacOS jdmuys$ xcode-select --print-path
/Applications/Xcode51-Beta4.app/Contents/Developer
(doesn't help if I switch to a non beta version of Xcode)
and
retine:MacOS jdmuys$ ruby --version
ruby 1.9.3p327 (2012-11-10) [x86_64-darwin12.2.0]
Any idea what is happening and what I can do to fix it?
Thanks
I ran into a similar issue, and re-installing without sudo – gem install cocoapods – fixed the issue for me.

Redmine - incompatible versions for Bundler

I'm trying to install the 2.3.2 version of Redmine being offline. When I launch the command:
bundle install --without postgresql --local
I get this error:
Bundler could not find compatible versions for gem 'ruby-openid':
In Gemfile:
rack-openid (>= 0) ruby depends on
ruby-openid (>= 2.1.8) ruby
ruby-openid (2.1.4)
I understand the problem but how do I solve it?
Well, you need to install a version newer than 2.1.8 of ruby-openid as only these versions are supported by the rack-openid gem which is required by Redmine.
You could download the current version of the gem (2.2.3) from rubygems.org and transfer that file to your server. The you can run
gem install ruby-openid-2.2.3.gem
to install the gem.
If you don't need OpenID authentication, you can exclude it:
bundle install --without postgresql openid --local

Incompatible version for gem "activesupport" while installing "threetaps-client" gem

I'm fairly new to rails and I encountered this gem conflict, while running bundle install, between ActiveSupport and threetaps-client (which I need to use for my project).
I tried removing the Gemfile.lock file and running bundle install again but it gave me the same error message again. I also tried running bundle update which also gave the same result :(
Bundler could not find compatible versions for gem "activesupport":
In snapshot (Gemfile.lock):
activesupport (3.2.13)
In Gemfile:
threetaps-client (>= 0) ruby depends on
activesupport (~> 3.0.0) ruby
Running `bundle update` will rebuild your snapshot from scratch, using only
the gems in your Gemfile, which may resolve the conflict.
The issue here is that you are using Rails 3.2 (and thus, activesupport 3.2). However, threetaps-client is version locked to rails/activesupport 3.0.x. The easiest solution to this would be to downgrade Rails to 3.0 in your Gemfile with:
gem "rails", "~> 3.0"
And then remove the Gemfile.lock and bundle install again. You should be good to go after that.
EDIT
I was able to get the gem to support activesupport 3.2 (I think). The tests do not pass on this branch, but they did not pass on master either. I assume this probably has to do with credentials or something. Update your Gemfile to use this repo for threetaps-client
gem "threetaps-client", git: "git#github.com:ehowe/3taps-Ruby-Client"
Insert required "your mileage may vary" warning here.

Resources