Closed Code-Farmer-Ming closed 7 years ago
How are you getting this error?
Got the same:
$ gem install language_cards
Fetching: language_cards-0.0.1.gem (100%)
Successfully installed language_cards-0.0.1
Parsing documentation for language_cards-0.0.1
Installing ri documentation for language_cards-0.0.1
Done installing documentation for language_cards after 0 seconds
1 gem installed
$ language_cards
checking for clear... yes
_ _ __ _ ____ _ _ _ ____ _______
| | / \ | \ | | / __ \ | | | | / \ / __ \ | _____|
| | / _ \ | \ | | / / \_\ | | | | / _ \ / / \_\ | |
| | / /_\ \ | |\ \| || | ___ | | | | / /_\ \ | | ___ | ^‒‒‒v
| | / _____ \ | | \ \ || | |_ || | | | / _____ \ | | |_ || .‒‒‒^
| |____ / / \ \ | | \ | \ \__/ | \ \_/ / / / \ \ \ \__/ || |_____
|______|/_/ \_\|_| \_| \____/_| \___/ /_/ \_\ \____/_||_______|
____ _ _____ _____ _____
/ __ \ / \ | __ \ | __ \ / ___/
/ / \_\ / _ \ | | \ \ | | \ \ / /__
| | / /_\ \ | |__/ / | | | | \___ \
| | _ / _____ \ | __ < | | | | \ \
\ \__/ / / / \ \ | | \ \ | |__/ / ___/ /
\____/ /_/ \_\|_| \_\ |_____/ /____/
by Daniel P. Clark
@6ftdan
Then I pressed Enter and got:
~/.rvm/gems/ruby-2.3.0/gems/i18n-0.7.0/lib/i18n.rb:284:in `enforce_available_locales!': :en is not a valid locale (I18n::InvalidLocale)
from ~/.rvm/gems/ruby-2.3.0/gems/i18n-0.7.0/lib/i18n.rb:151:in `translate'
from ~/.rvm/gems/ruby-2.3.0/gems/language_cards-0.0.1/lib/language_cards/user_interface.rb:6:in `main_menu'
from ~/.rvm/gems/ruby-2.3.0/gems/language_cards-0.0.1/lib/language_cards/user_interface.rb:41:in `block in start'
from ~/.rvm/gems/ruby-2.3.0/gems/language_cards-0.0.1/lib/language_cards/user_interface.rb:38:in `loop'
from ~/.rvm/gems/ruby-2.3.0/gems/language_cards-0.0.1/lib/language_cards/user_interface.rb:38:in `start'
from ~/.rvm/gems/ruby-2.3.0/gems/language_cards-0.0.1/lib/language_cards/language_cards.rb:15:in `start'
from ~/.rvm/gems/ruby-2.3.0/gems/language_cards-0.0.1/lib/language_cards.rb:37:in `start'
from ~/.rvm/gems/ruby-2.3.0/gems/language_cards-0.0.1/bin/language_cards:7:in `<top (required)>'
from ~/.rvm/gems/ruby-2.3.0/bin/language_cards:23:in `load'
from ~/.rvm/gems/ruby-2.3.0/bin/language_cards:23:in `<main>'
from ~/.rvm/gems/ruby-2.3.0/bin/ruby_executable_hooks:15:in `eval'
from ~/.rvm/gems/ruby-2.3.0/bin/ruby_executable_hooks:15:in `<main>'
I'm on an Ubuntu 14.04 with ruby 2.3 through rvm.
$ uname -a
Linux c1315lx 3.19.0-78-generic #86~14.04.1-Ubuntu SMP Tue Dec 6 17:58:35 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
$ ruby -v
ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-linux]
Update: If I clone the repo and execute that it works - so maybe some bug in the release version?
Perhaps it's an absolute path issue... Let me check.
Yep... that was the issue. One moment please ....
Alright. Version 0.0.3 has been released and has the fix. Feel free to reopen this issue if it occurs again (which it shouldn't)
/2.3.0/gems/i18n-0.7.0/lib/i18n.rb:284:in `enforce_available_locales!': :en is not a valid locale (I18n::InvalidLocale)