NoMethodError: undefined method `language_iso' for "This is a test":String
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
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.
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...?
Steps to reproduce
require 'whatlanguage'
# => true
"".language
# NoMethodError: undefined method `language' for "":String
require 'whatlanguage/string'
# => true
"".language
# => nil
Related PR: https://github.com/peterc/whatlanguage/pull/31
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.