Closed umuthan closed 12 years ago
Hi,
Can you explain what have you done ? All the steps you have made are important to understand what gone wrong
I just follow the steps that written on the README file.
first it give this error : "/Library/Ruby/Gems/1.8/gems/polyglot-0.3.3/lib/polyglot.rb:63:in `polyglot_original_require': no such file to load -- easy_globalize3_accessors (LoadError)"
i google it and found this https://github.com/jipiboily/spree_multi_lingual/issues/11 then it solves my first problem.
Second time i got syntax error like i write in this issue.
Hi, are you using ruby 1.8.7 for some reason?
This is breaking because in this file (line 50) https://github.com/jipiboily/spree_multi_lingual/blob/master/lib/spree_multi_lingual/translates_with_accessors.rb#L50
The syntax is for ruby 1.9.3
The old way is :
:attributes => params.to_a if accessors
The new way
attributes: params.to_a if accessors
So, consider upgrade your ruby version to 1.9.3
Yep i use ruby 1.8.7 :)
Now i updated to 1.9.3 but i get this error now :
append app/assets/javascripts/store/all.js
append app/assets/javascripts/admin/all.js
insert app/assets/stylesheets/store/all.css
insert app/assets/stylesheets/admin/all.css
run bundle exec rake railties:install:migrations FROM=spree_multi_lingual from "."
Would you like to run the migrations now? [Y/n] Y run bundle exec rake db:migrate from "." == AddTranslationTables: migrating =========================================== rake aborted! An error has occurred, all later migrations canceled:
uninitialized constant AddTranslationTables::Product
Tasks: TOP => db:migrate (See full trace by running task with --trace)
Hum.... wierd.
Open your db/migrate/ (file '_add_translation_to_product.spree_multi_lingual.rb')
This is what I have inside my file. What that error says is that is looking for the class AddTranslationTables::Product in my case it's AddTranslationToProduct, check it
# This migration comes from spree_multi_lingual (originally 20120213172418)
class AddTranslationToProduct < ActiveRecord::Migration
def up
Spree::Product.create_translation_table! :name => :string, :description => :text, :meta_description => :string, :meta_keywords => :string
end
def down
Spree::Product.drop_translation_table!
end
end
I have a lot of migration files inside db/migrate folder. I remove them then install spree_multi_lingual again.
It works :), thanks.
You're welcome, glad I could help
hi i get a sytax error while installation : /Library/Ruby/Gems/1.8/gems/polyglot-0.3.3/lib/polyglot.rb:63:in
polyglot_original_require': /Users/umuthanuyan/railsprojects/----/vendor/cache/spree_multi_lingual-86981bd6d407/lib/spree_multi_lingual/translates_with_accessors.rb:50: syntax error, unexpected ':', expecting kEND (SyntaxError) ... globalize_accessors locales: SpreeMultiLingual.languages, ... ^ /Users/umuthanuyan/railsprojects/----/vendor/cache/spree_multi_lingual-86981bd6d407/lib/spree_multi_lingual/translates_with_accessors.rb:50: syntax error, unexpected ':', expecting '=' ...Lingual.languages, attributes: params.to_a if accessors ^ from /Library/Ruby/Gems/1.8/gems/polyglot-0.3.3/lib/polyglot.rb:63:in
require' from /Library/Ruby/Gems/1.8/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:251:inrequire' from /Library/Ruby/Gems/1.8/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:236:in
load_dependency' from /Library/Ruby/Gems/1.8/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:251:inrequire' from /Users/umuthanuyan/railsprojects/----/vendor/cache/spree_multi_lingual-86981bd6d407/lib/spree_multi_lingual.rb:6 from /Library/Ruby/Gems/1.8/gems/bundler-1.2.0.rc/lib/bundler/runtime.rb:68:in
require' from /Library/Ruby/Gems/1.8/gems/bundler-1.2.0.rc/lib/bundler/runtime.rb:68:inrequire' from /Library/Ruby/Gems/1.8/gems/bundler-1.2.0.rc/lib/bundler/runtime.rb:66:in
each' from /Library/Ruby/Gems/1.8/gems/bundler-1.2.0.rc/lib/bundler/runtime.rb:66:inrequire' from /Library/Ruby/Gems/1.8/gems/bundler-1.2.0.rc/lib/bundler/runtime.rb:55:in
each' from /Library/Ruby/Gems/1.8/gems/bundler-1.2.0.rc/lib/bundler/runtime.rb:55:inrequire' from /Library/Ruby/Gems/1.8/gems/bundler-1.2.0.rc/lib/bundler.rb:128:in
require' from /Users/umuthanuyan/railsprojects/----/config/application.rb:7 from /Library/Ruby/Gems/1.8/gems/railties-3.2.6/lib/rails/commands.rb:24:inrequire' from /Library/Ruby/Gems/1.8/gems/railties-3.2.6/lib/rails/commands.rb:24 from script/rails:6:in
require' from script/rails:6