Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SolidusI18n error with solidus v2.0.0 #73

Closed
useiichi opened this issue Oct 15, 2016 · 5 comments
Closed

SolidusI18n error with solidus v2.0.0 #73

useiichi opened this issue Oct 15, 2016 · 5 comments

Comments

@useiichi
Copy link

useiichi commented Oct 15, 2016

I see forrowing error at Admin-Settings with solidus v2.0.0.
when I remove a line "gem 'solidus_i18n'" from Gemfile, I don't see this error.

NameError in Spree::Admin::GeneralSettings#edit

Showing /var/www/solidus/backend/app/views/spree/admin/general_settings/edit.html.erb where line #71 raised:

uninitialized constant SolidusI18n::LocaleHelper::Locale

Extracted source (around line #18):
16 # this project. solidusio/solidus now has those keys.
17 def all_locales_options
18 Locale.all.map { |locale| locale_presentation(locale) }.push(['English (EN)', :en])
19 end
20
21 private
@Takashi-U
Copy link

If you use Rails5, you should set autoloading is enable.

config/environments/production.rb
config.enable_dependency_loading = true

I also had the same problem, but was resolved with this.
As another method, you can also create a Locale class in the initializer. However, you need to set a reference destination locales folder.

I am not familiar with Rails, I do not know how may I send what kind of patch. Although the LocaleHelper in the app folder below is loaded, you will need to resolve the phenomenon in which the Locale is not loaded in the following lib folder.

@useiichi
Copy link
Author

thanks.
I'm using Rails5.
I'v resolved with your first method.

@useiichi
Copy link
Author

It's better to solve this probrem without setting config.enable_dependency_loading = true.
I couldn't anderstand Takashi-U's second method.
Can anyone solve?

tvdeyen added a commit that referenced this issue Nov 26, 2016
Sometimes Rails Module lockup causes errors like in #73

Closes #73
@tvdeyen
Copy link
Member

tvdeyen commented Nov 26, 2016

@useiichi could you please try use the path from #78 in your app?

@useiichi
Copy link
Author

useiichi commented Dec 4, 2016

thanks for tvdeyen.
but, I could'nt fix this probrem with your path from #78.
this error still occur.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants