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

How to use this gem #1

Closed
itsbalamurali opened this issue Nov 13, 2013 · 3 comments
Closed

How to use this gem #1

itsbalamurali opened this issue Nov 13, 2013 · 3 comments

Comments

@itsbalamurali
Copy link

Is this correct but this doesn't work please help

require 'favico'
fparser = Favicon::Parser.new
fparser.fetch_favicon_url("http://google.com")
@codingjester
Copy link
Owner

require 'favico'
fparser = Favico::Parser.new
fparser.fetch_favicon_url('http://google.com')

That should be what you want :)

@itsbalamurali
Copy link
Author

but it gives me an Error as below

 require 'favico'
LoadError: cannot load such file -- httparty
    from /home/balamurali/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /home/balamurali/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /home/balamurali/.rvm/gems/ruby-1.9.3-p448/gems/favico-0.0.2/lib/favico/parser.rb:2:in `<top (required)>'
    from /home/balamurali/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /home/balamurali/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /home/balamurali/.rvm/gems/ruby-1.9.3-p448/gems/favico-0.0.2/lib/favico.rb:1:in `<top (required)>'
    from /home/balamurali/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:135:in `require'
    from /home/balamurali/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:135:in `rescue in require'
    from /home/balamurali/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:144:in `require'
    from (irb):1
    from /home/balamurali/.rvm/rubies/ruby-1.9.3-p448/bin/irb:12:in `<main>'
1.9.3p448 :002 > fparser = Favico::Parser.new
NameError: uninitialized constant Favico
    from (irb):2
    from /home/balamurali/.rvm/rubies/ruby-1.9.3-p448/bin/irb:12:in `<main>'
1.9.3p448 :003 > fparser.fetch_favicon_url('http://google.com')
NoMethodError: undefined method `fetch_favicon_url' for nil:NilClass
    from (irb):3
    from /home/balamurali/.rvm/rubies/ruby-1.9.3-p448/bin/irb:12:in `<main>'

@codingjester
Copy link
Owner

How did you install the gem? You need to also install httparty for it to work.

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

2 participants