I want to scrape with ruby, but I can't require mechanize.

Asked 2 years ago, Updated 2 years ago, 124 views

When I try to scrape and run it, it looks like this.
I'm in trouble because I don't understand even if I look into it.Please give me a solution.

$ruby scraping_image.rb

/Users/000/.rbenv/versions/2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require':cannot load Such file --mechanize (LoadError)

from 
/Users/000/.rbenv/versions/2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'

from 
scraping_image.rb:1:in`<main>`

ruby web-scraping mechanize

2022-09-30 21:27

1 Answers

Use the gem list command to get a list of installed gems and see if there is a mechanize.In macOS/Unix/Linux environments, the gem list | grep mechanismize provides easy-to-see output.You seem to be using rbenv, so please check it out just in case.


2022-09-30 21:27

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.