All Questions
34 questions
1
vote
0
answers
281
views
Cannot load such file --mechanize
There is a class called ParseSearch.rb, which uses mechanize gem.
I made a new file that is used for Ruby Shoes(GUI) and I required all gems that are needed
require "mechanize"
require "rubygems"
...
2
votes
1
answer
368
views
How can I get my Ruby gem 'Mechanize' to work?
I need to install the Ruby gem 'Mechanize' for a class that I am taking and do a project using it. I am using windows and I have tried installing versions 2.6.1 and 2.5.3 with the devkits from the ...
0
votes
2
answers
205
views
How to scrape all reviews if they are on different pages?
How to scrape all reviews from walmart review page (ex:http://www.walmart.com/ip/Ematic-9-Dual-Screen-Portable-DVD-Player-with-Dual-DVD-Players-ED929D/28806789) if they are on different pages?I scrape ...
1
vote
1
answer
66
views
ruby "class << self" might cause the error in gem?
I am trying to get use out of the "HTTP-Cookie" gem. Because I need it, working. But it seems that there is a Bug inside the Gem, and its not maintained for over one year.
The solution is: Make it ...
0
votes
0
answers
330
views
Ruby Mechanize for Javascript Rendered Form, POST request
Okay so I am trying to do some webscraping of my league on NFL.com/fantasy and the first thing I need to do is login.
I am trying to use mechanize,
Unfortunately, the form that NFL.com uses for ...
0
votes
2
answers
225
views
Mechanize won't conect to site
Welcome, I got a problem, gem mechanize won't connect to a site. Gem is installed.
Code:
require 'mechanize'
agent = Mechanize.new
main_page = agent.get 'https://imbd.com'
main_page.link_with(text: ...
0
votes
2
answers
834
views
Can't install gem nokogiri with 2.3.0p ruby [duplicate]
Welcome, I tried to install gem mechanize and got stuck at nokogiri gem. Then I tried to install nokogiri gem and got stuck also. Here is my CMD, this doesn't make sense ;/
>ruby -v
ruby 2.3.0p0 (...
0
votes
1
answer
878
views
Install mechanize with Ruby 2.3 on Windows 7 got error
I'm trying to install Mechanize with Ruby 2.3 on Windows 7. However I got the following error. Could anyone point me to the right direction?
PS C:\DevKit> ruby --version
ruby 2.3.0p0 (2015-12-25 ...
0
votes
0
answers
378
views
Unable to install ruby gem mechanize on RedHat 7.2
I got these message while installing mechanize Gem:
[root@nemon ~]# gem install mechanize
> (RuntimeError) You have to install development tools first.
Whole log:
Building native extensions. ...
0
votes
3
answers
873
views
How can I download all images available in a URL?
I want to download all images of a product available in this link:
http://www.veromoda.in/vero-moda-women-s-white-coloured-casual-shirt-4.html
I know how to download a single image by passing the ...
0
votes
4
answers
789
views
Can't find mechanize gem error require
So i've been using the mechanize gem fine on my OSX machine but now when i'm trying to use it on my Win10 machine i've run into some issues. Basically it can't find the mechanize gem for some reason. ...
0
votes
1
answer
89
views
Open SSL Errors for Ruby on Windows 7
I'm running on Windows 7 normal OS.
Ruby, SSL, and Windows don't like each other, so simple commands like these don't work for me and it's giving me a real headache. I've tried getting RVM, updating ...
0
votes
1
answer
1k
views
How to get text from list items with Mechanize?
<div class="carstd">
<ul>
<li class="cars">"Car 1"</li>
<li class="cars">"Car 2"</li>
<li class="cars">"Car 3"</li>
<li class="cars"...
0
votes
2
answers
97
views
Automated filling in, submission and review of response of javascript form in ruby
I'm building a hobby/hack project which needs to cross-reference a users' GMC number with a publicly available source of numbers at http://webcache.gmc-uk.org/gmclrmp_enu/start.swe
The actions need ...
0
votes
1
answer
355
views
How do I use Mechanize to go through each link?
Am trying to go through a series of links with a css class title and click those links and then get the product title. But i keep getting the error undefined method each for #<Mechanize::Page::Link:...
1
vote
2
answers
3k
views
RubyForge dead - now what? [closed]
Does anyone know what happened to RubyForge.org? The website is always down now. If it's permanently dead, does anyone know where they put all the stuff they used to host?
I end up using Ruby a ...
0
votes
2
answers
272
views
Installing JRuby gems with Mina
I'm trying to deploy an app on JRuby with Mina, but one gem doesn't install and actually it shouldn't be installed in the first place...
The gem is unf_ext and it is a Mechanize dependency. If I SSH ...
0
votes
0
answers
62
views
Ruby - Mechanize Gem
I can't even get past this stage of my code:
require "rubygems"
require "open-uri"
require "mechanize"
puts "success"
I keep getting in these junctures at custom_require.rb:
gem_original_require ...
1
vote
1
answer
756
views
Correct way to call Ruby script in HTML
Is this the correct way to call a ruby script in an HTML file?
HTML
<form id="cse-search-box" action="mechanize.rb">
<input type="text" id="text" name="text_name" class="mytext" />
<...
0
votes
1
answer
329
views
Mechanize with SSL thru proxy error
My code:
require 'machanize'
agent = Mechanize.new
agent.user_agent = 'Mac Safari'
page = agent.get 'https://github.com
Everything is ok. But here what i've got if try to use proxy
require '...
0
votes
2
answers
349
views
How to log in to TDAmeritrade with Ruby Mechanize GEM?
I'm using Ruby with the Mechanize GEM to log in to TDAmeritrade's website.
I try to execute: page = agent.get('https://invest.ameritrade.com/grid/p/login') and it returns page.forms as follows:
2.0....
0
votes
1
answer
813
views
Click a input type submit - Mechanize Ruby
I am trying to click a button which is actually a submit without a form which looks some thing like this and store the result in an object
<div class="searchBar-input">
<input id="front-...
0
votes
1
answer
362
views
Is it possible to use Ruby Mechanize without Nokogiri?
I wonder if is it possible to use Ruby Mechanize without Nokogiri? I never use Nokogiri explicitly.
Maybe it would be a little faster, at least the starting of the application?
2
votes
1
answer
3k
views
Selecting "" links with mechanize in ruby
I made a script in ruby that uses mechanize. It goes to google.com, logs you in and the does an image search for cats. Next i want to select one of the results links from the page and then save the ...
0
votes
1
answer
123
views
How do I retrieve HTML for content?
I am trying to write code that would take a user-input URL and print that page's HTML content to the screen. The goal is to eventually create a script that will organize all of the text on the page.
...
1
vote
2
answers
264
views
Using ruby to retrieve a document from a website
I have written a script in ruby that navigates through a website and gets to a form page. Once the form page is filled out the script hits the submit button and then a dialogbox opens asking you where ...
7
votes
3
answers
2k
views
LoadError: no such file to load -- mechanize
Any suggestions why this doesn't work?
[app (master)]$ gem install mechanize
Successfully installed mechanize-2.5.1
1 gem installed
[app (master)]$ rails c
Loading development environment (Rails 3.2....
1
vote
2
answers
494
views
is it possible to convert Mechanize::File into Mechanize::Page
I'm having a trouble with Mechanize gem, how to convert Mechanize::File into Mechanize::Page,
here's my piece of code:
**link** = page.link_with(:href => %r{/en/users}).click
when users link ...
1
vote
2
answers
1k
views
Cannot installing mechanize for ruby on mac
I am trying to install mechanize on a Mac OS X Version 10.7.3 with ruby version 1.8.7. The problem is with one of its dependencies nokogiri. I have seen other posts about having xcode installe and I ...
1
vote
2
answers
827
views
Ruby Mechanize gem, restore Mechanize::Page object from local html copy
here is code that I have:
agent = Mechanize.new
page = agent.get 'http://google.com'
page.save 'google_index.htm'
How can I restore that google_index.htm to Mechanize::Page object and continue ...
0
votes
1
answer
350
views
ruby mechanize requires full class name
why do you need the full name for mechanize as so:
#!/usr/bin/ruby -w
require 'rubygems'
require 'pp'
require 'yaml'
require "mechanize"
yml = YAML.load_file 'login.yml'
user = yml["user"]
pword = ...
1
vote
1
answer
2k
views
ruby: irb gives NameError attempting to use mechanize gem (ubuntu)
On my ubuntu box, irb (ruby) gives a NameError when I try to use the mechanize gem:
$ irb
irb(main):001:0> require 'mechanize'
=> true
irb(main):002:0> Mechanize.new
NameError: uninitialized ...
3
votes
3
answers
1k
views
Rails "Missing these required gems" error for installed gems
I know this has been asked multiple times before, but I've tried those things and still am not having any luck.
For the mechanize gem, I keep getting the "Missing these required gems" error when I ...
4
votes
2
answers
8k
views
mechanize and redirecting (ruby)
I thought that mechanize follows redirection by default ... by my script ends at the redirection page. How can I handle this?
require 'rubygems'
require 'mechanize'
agent = WWW::Mechanize.new
page ...