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

NoMethodError: undefined method `language_iso' for "This is a test":String #34

Open
davidesantangelo opened this issue Aug 19, 2015 · 4 comments

Comments

@davidesantangelo
Copy link

When i try this "This is a test".language_iso # => :en i got this NoMethodError: undefined method `language_iso' for "This is a test":String

@peterc
Copy link
Owner

peterc commented Aug 19, 2015

Ah, I think the version that includes that hasn't been gemified yet - the latest version on rubygems.org is older than the head version here. You can specify this repo in your Gemfile if you want to resolve this immediately, however.

@sixtyfive
Copy link

Not sure if I'm having the same or a different issue - I did install from the GitHub repo and can't execute any of the examples using String. require 'whatlanguage' returns true and WhatLanguage.new(:all) returns an object, but String.language simply doesn't exist...?

@Deradon
Copy link

Deradon commented Jun 6, 2016

Steps to reproduce

require 'whatlanguage'
# => true

"".language
# NoMethodError: undefined method `language' for "":String

require 'whatlanguage/string'
# => true

"".language
# => nil

Related PR: #31

@TuulaP
Copy link

TuulaP commented Jun 27, 2016

Experimented a bit on Windows7 , 2.2.4p230, and after adding as suggested earlier
gem 'whatlanguage', github: 'peterc/whatlanguage' to Gemfile (gets this one installed) and

require 'whatlanguage/string'
to dsl.rb

and finally the language method is found.

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

5 participants