Created
April 28, 2014 00:37
-
-
Save cernalpanic/11359027 to your computer and use it in GitHub Desktop.
why aren't these methods available in rails console?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I'm trying to work with the rails console and this gem: | |
https://github.com/sethvargo/isbndb | |
in my my Gem file: | |
gem 'isbndb', '~> 2.0.2' | |
(ran 'bundle install' and 'bundle update') | |
opened the console (rails c) | |
@query = ISBNdb::Query.new #=> #<ISBNdb::Query:0x00000105c18d00> | |
@query.class #=> ISBNdb::Query | |
but, why can't i do: | |
@query.find_book_by_title('Ruby') | |
NoMethodError: undefined method `find_book_by_title' for #<ISBNdb::Query:0x00000105c18d00> | |
from (irb):28 | |
from /Users/x/.rvm/gems/ruby-2.0.0-p353/gems/railties-4.0.4/lib/rails/commands/console.rb:90:in `start' | |
from /Users/x/.rvm/gems/ruby-2.0.0-p353/gems/railties-4.0.4/lib/rails/commands/console.rb:9:in `start' | |
from /Users/x/.rvm/gems/ruby-2.0.0-p353/gems/railties-4.0.4/lib/rails/commands.rb:62:in `<top (required)>' | |
from bin/rails:4:in `require' | |
from bin/rails:4:in `<main>' | |
I will confess that i don't know what this is from the docs: | |
access_keys: | |
- KEY_1 | |
- KEY_2 | |
So i implemented it as: | |
access_keys: | |
_ 'thor' | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment