ttscoff / Slogger

Social logging script for Day One
756 stars 160 forks source link

fitbit issue #115

Open thermopyl opened 11 years ago

thermopyl commented 11 years ago

Hi I have installed fitgem as per instructions... Terminal output: "Successfully installed fitgem-0.5.2 1 gem installed Installing ri documentation for fitgem-0.5.2... Installing RDoc documentation for fitgem-0.5.2..."

when i then run ./slogger, i receive the following rather than any update to the config gile or oauth request..

/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in gem_original_require': no such file to load -- json (LoadError) from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:inrequire' from /Library/Ruby/Gems/1.8/gems/fitgem-0.5.2/lib/fitgem.rb:1 from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:36:in gem_original_require' from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:36:inrequire' from /Users/scott/Dropbox/Slogger/plugins/fitbit.rb:30 from /Users/scott/Dropbox/Slogger/slogger.rb:182:in require' from /Users/scott/Dropbox/Slogger/slogger.rb:182:inrun_plugins' from /Users/scott/Dropbox/Slogger/slogger.rb:174:in each' from /Users/scott/Dropbox/Slogger/slogger.rb:174:inrun_plugins' from /Users/scott/Dropbox/Slogger/slogger.rb:325 from ./slogger:18:in `require'

can someone tell me where this is going wrong please

blackader commented 11 years ago

Try upgrading your Ruby install to 1.9.x.

ttscoff commented 11 years ago

The default plugins will never require a Ruby upgrade and no gem installation. The user-contributed ones I can't speak for. I don't want to take away the flexibility that comes with requiring new versions and extra libraries, so they just need to contain clear indications (and instructions) if that's the case.

There are a ton of non-Ruby masters using Slogger, and it's already difficult enough to set up :).

drallgood commented 11 years ago

I can definitely confirm that it should work with the 1.8.x branch of ruby. That's the one that is installed on Mountain Lion by default and I wouldn't expect anyone to install a new ruby version just to run a plugin.

As for the requirement to install fitgem: The decision to use it wasn't an easy one. The alternative would have been to implement the necessary API calls myself, which I didn't feel was the right approach in terms of extensibility and maintainability. This obviously isn't ideal as a user needs to read the instructions and install it manually, but my guess was that this wouldn't be a big issue.

schmidjon commented 11 years ago

Installed fitgem, just as described by the original poster. Here's what I get when running ./slogger:

/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in gem_original_require': no such file to load -- json (LoadError) from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:inrequire' from /Library/Ruby/Gems/1.8/gems/fitgem-0.6.1/lib/fitgem.rb:1 from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:36:in gem_original_require' from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:36:inrequire' from /Users/schmidjon/Dropbox/scripts/slogger/plugins/fitbit.rb:32 from /Users/schmidjon/Dropbox/scripts/slogger/slogger.rb:236:in require' from /Users/schmidjon/Dropbox/scripts/slogger/slogger.rb:236:inrun_plugins' from /Users/schmidjon/Dropbox/scripts/slogger/slogger.rb:228:in each' from /Users/schmidjon/Dropbox/scripts/slogger/slogger.rb:228:inrun_plugins' from /Users/schmidjon/Dropbox/scripts/slogger/slogger.rb:378 from ./slogger:18:in `require' from ./slogger:18

I'm running OSX 10.8.2.

Thanks.

drallgood commented 11 years ago

Could you please try to install json and check whether that helps?

gem install json

nickwild99 commented 11 years ago

Hi,

I had this error, but then I installed Ruby 2.0.0 through RVM and got this error before I was dlivered an oauth url and request for a verifier.

/Users/nickwild/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/json/version.rb:3: warning: already initialized constant JSON::VERSION /Users/nickwild/Documents/Programming/Slogger/lib/json/version.rb:3: warning: previous definition of VERSION was here /Users/nickwild/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/json/version.rb:4: warning: already initialized constant JSON::VERSION_ARRAY /Users/nickwild/Documents/Programming/Slogger/lib/json/version.rb:4: warning: previous definition of VERSION_ARRAY was here /Users/nickwild/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/json/version.rb:5: warning: already initialized constant JSON::VERSION_MAJOR /Users/nickwild/Documents/Programming/Slogger/lib/json/version.rb:5: warning: previous definition of VERSION_MAJOR was here /Users/nickwild/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/json/version.rb:6: warning: already initialized constant JSON::VERSION_MINOR /Users/nickwild/Documents/Programming/Slogger/lib/json/version.rb:6: warning: previous definition of VERSION_MINOR was here /Users/nickwild/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/json/version.rb:7: warning: already initialized constant JSON::VERSION_BUILD /Users/nickwild/Documents/Programming/Slogger/lib/json/version.rb:7: warning: previous definition of VERSION_BUILD was here /Users/nickwild/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/json/common.rb:99: warning: already initialized constant JSON::NaN /Users/nickwild/Documents/Programming/Slogger/lib/json/common.rb:98: warning: previous definition of NaN was here /Users/nickwild/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/json/common.rb:101: warning: already initialized constant JSON::Infinity /Users/nickwild/Documents/Programming/Slogger/lib/json/common.rb:100: warning: previous definition of Infinity was here /Users/nickwild/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/json/common.rb:103: warning: already initialized constant JSON::MinusInfinity /Users/nickwild/Documents/Programming/Slogger/lib/json/common.rb:102: warning: previous definition of MinusInfinity was here /Users/nickwild/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/json/common.rb:128: warning: already initialized constant JSON::UnparserError /Users/nickwild/Documents/Programming/Slogger/lib/json/common.rb:121: warning: previous definition of UnparserError was here

Any thoughts?

Many thanks

drallgood commented 11 years ago

Those are only warnings... No idea how to get rid of them.

drallgood commented 10 years ago

Guess this can be closed.