watson-ruby
watson-ruby copied to clipboard
Install watson-ruby on MACOSX
I'm having a lot of troubles installing watson-ruby on my macbook pro. I've Mountain Lion, that ships with ruby < 2.0.0, so to install watson I'll have to reinstall ruby and gem. Do you really need to force ruby >= 2.0.0 ? Could you provide a working app for macosx? I think others osx users will be happy to use watson ;)
This was on my todo list but I haven't gotten around to it yet.
The last time I looked at this problem it was because I used some Ruby >=2.0.0 syntax such as __dir__
which doesn't work with older versions.
I'll take another look at it; if that is the only compatibility issue it should be a quick fix :)
@diegoceccarelli can you test this out and let me know if it works (http://goosecode.com/watson/watson-ruby193.gem)? If you prefer, I can push the branch and you can pull and build yourself. I tested with Ruby v1.9.3 but I'm not sure if I missed anything or the default OSX version is before that.
nope :( ruby version is 1.8.7 :P maybe I'm the only one having this issue?
diego@syrah:~$ gem install --local watson-ruby193.gem
ERROR: Error installing watson-ruby193.gem:
watson-ruby requires Ruby version >= 2.0.0.
diego@syrah:~$ gem --version
2.2.0
diego@syrah:~$ gem environment
RubyGems Environment:
- RUBYGEMS VERSION: 2.2.0
- RUBY VERSION: 1.8.7 (2012-02-08 patchlevel 358) [universal-darwin12.0]
- INSTALLATION DIRECTORY: /Library/Ruby/Gems/1.8
- RUBY EXECUTABLE: /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
- EXECUTABLE DIRECTORY: /usr/bin
- SPEC CACHE DIRECTORY: /Users/diego/.gem/specs
- RUBYGEMS PLATFORMS:
- ruby
- universal-darwin-12
- GEM PATHS:
- /Library/Ruby/Gems/1.8
- /Users/diego/.gem/ruby/1.8
- /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- https://rubygems.org/
- SHELL PATH:
- /usr/local/heroku/bin
- /usr/local/sbin
- /usr/bin
- /bin
- /usr/sbin
- /sbin
- /usr/local/bin
- /usr/texbin
Nope! That was my fault, I forgot to remove the dependency check on that gem :( Can you try it again (http://goosecode.com/watson/watson-ruby193-update1.gem) and let me know how that goes?
Now, it works but I get:
/Library/Ruby/Gems/1.8/gems/watson-ruby-1.6.1/lib/watson.rb:1: undefined method `require_relative' fo main:Object (NoMethodError)
from /Library/Ruby/Site/1.8/rubygems/core_ext/kernel_require.rb:55:in `gem_original_require'
from /Library/Ruby/Site/1.8/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Library/Ruby/Gems/1.8/gems/watson-ruby-1.6.1/bin/watson:5
from /usr/bin/watson:23:in `load'
from /usr/bin/watson:23
I guess the problem is ruby1.8.x, no?
@diegoceccarelli after taking a look with Ruby 1.8.x it seems like the changes aren't as minimal as I'd like (the codebase would get messy if I wanted to support 1.8.x-->2.1.x) What I will probably end up doing (hopefully soon) is creating a 1.8.x branch and corresponding gem that will have the necessary support built in. Sorry for the late reply!
Thank @nhmood, no worries for the late reply, there's no hurry! I would be happy to use watson (and I think, there could be other osx users happy to use it ;) ) Cheers!