instructure / i18nema

fast i18n backend that doesn't stop up the garbage collector
65 stars 12 forks source link

cannot load such file -- syck (LoadError) #1

Closed JuanitoFatas closed 10 years ago

JuanitoFatas commented 10 years ago

Hi. I just install i18nema in my Rails 4 app with Ruby 2.0. And try to run rails console but get the following error:

/Users/Juanito/.rvm/gems/ruby-2.0.0-p353@example/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `require': cannot load such file -- syck (LoadError)
  from /Users/Juanito/.rvm/gems/ruby-2.0.0-p353@example/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `block in require'
  from /Users/Juanito/.rvm/gems/ruby-2.0.0-p353@example/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:214:in `load_dependency'
  from /Users/Juanito/.rvm/gems/ruby-2.0.0-p353@example/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `require'
  from /Users/Juanito/.rvm/gems/ruby-2.0.0-p353@example/gems/i18nema-0.0.7/lib/i18nema.rb:1:in `<top (required)>'
  from /Users/Juanito/.rvm/gems/ruby-2.0.0-p353@global/gems/bundler-1.5.2/lib/bundler/runtime.rb:76:in `require'
  from /Users/Juanito/.rvm/gems/ruby-2.0.0-p353@global/gems/bundler-1.5.2/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
  from /Users/Juanito/.rvm/gems/ruby-2.0.0-p353@global/gems/bundler-1.5.2/lib/bundler/runtime.rb:72:in `each'
  from /Users/Juanito/.rvm/gems/ruby-2.0.0-p353@global/gems/bundler-1.5.2/lib/bundler/runtime.rb:72:in `block in require'
  from /Users/Juanito/.rvm/gems/ruby-2.0.0-p353@global/gems/bundler-1.5.2/lib/bundler/runtime.rb:61:in `each'
  from /Users/Juanito/.rvm/gems/ruby-2.0.0-p353@global/gems/bundler-1.5.2/lib/bundler/runtime.rb:61:in `require'
  from /Users/Juanito/.rvm/gems/ruby-2.0.0-p353@global/gems/bundler-1.5.2/lib/bundler.rb:131:in `require'
  from /Users/Juanito/dev/example/config/application.rb:14:in `<top (required)>'
  from /Users/Juanito/.rvm/gems/ruby-2.0.0-p353@example/gems/railties-4.0.2/lib/rails/commands.rb:74:in `require'
  from /Users/Juanito/.rvm/gems/ruby-2.0.0-p353@example/gems/railties-4.0.2/lib/rails/commands.rb:74:in `block in <top (required)>'
  from /Users/Juanito/.rvm/gems/ruby-2.0.0-p353@example/gems/railties-4.0.2/lib/rails/commands.rb:71:in `tap'
  from /Users/Juanito/.rvm/gems/ruby-2.0.0-p353@example/gems/railties-4.0.2/lib/rails/commands.rb:71:in `<top (required)>'
  from bin/rails:4:in `require'
  from bin/rails:4:in `<main>'
jenseng commented 10 years ago

oops, this should work :(

in the meantime, if you explicitly add syck to your Gemfile it will work

JuanitoFatas commented 10 years ago

I add syck to my Gemfile. It's still not working : ( Should the syck dependency list in i18nema.gemspec?

jenseng commented 10 years ago

what are the contents of you Gemfile? i just tested on a fresh ruby 2.0/rails 4 install and this worked for me:

source 'https://rubygems.org'

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.0.2'

# ...
# more rails Gemfile boilerplate
# ...

# Use debugger
# gem 'debugger', group: [:development, :test]

gem 'syck'
gem 'i18nema'

maybe you need to bundle install?

JuanitoFatas commented 10 years ago

I did have these two gems and did bundle install.

JuanitoFatas commented 10 years ago

Upgrade syck to 1.0.1 solve this problem (I'm able to enter rails console now). Do not know why.

Installing syck (1.0.1)
Updating files in vendor/cache
  * syck-1.0.1.gem
Removing outdated .gem files from vendor/cache
  * syck-1.0.0.gem
jenseng commented 10 years ago

regarding the syck dependency in the gemspec, ruby 1.9 already has syck built in so it doesn't need the gem. this was an attempt to make it work, but i've confirmed it doesn't work unless syck is in the application Gemfile.

i'll see if i can get it working, otherwise i'll publish a separate gem for ruby 2+ with the explicit syck dependency.

JuanitoFatas commented 10 years ago

@jenseng Thank you for your guidance and help. Before you released a separated gem. Document it for people who use Ruby 2.0 to explicitly add syck to Gemfile?

jenseng commented 10 years ago

@JuanitoFatas thanks for the bug report and helping to track this down. the readme has been updated, and there are two gems now (i18nema and i18nema19)