Installation Instructions

From Scrubyt

Jump to: navigation, search

Installation Instructions Thanks to RubyGems' ease of use, installing scRUBYt is incredibably easy. There are minimal steps involved and it should ensure that use are able to install the required dependencies with out a problem.

For this section, we are going to assume you already have RubyGems installed. If you do not, please refer to the RubyGems install section. If you encounter any problems, please join the forum and tell us!

Contents

[edit] Required dependencies

scRUBYt! requires these packages to be installed:

  • Ruby 1.8.5
  • Hpricot 0.5 or 0.6
  • Mechanize 0.6.5
  • RubyInline-3.6.3
  • RubyInlineAcceleration-0.0.1
  • ruby2ruby 1.1.6
  • ParseTree 1.7.1
  • ParseTreeReloaded 0.0.1

[edit] RubyInline Issue

scrubyt v 3.4.0 requires RubyInline 3.6.3 only and therefore if you're installing fresh you will check out the latest RubyInline (v. 3.7.0).

To verify you have a problem, after installing scrubyt check if you get an error similar to:

Gem::Exception: can't activate RubyInline (= 3.6.3, runtime), already activated RubyInline-3.7.0

Then do the following

gem uninstall RubyInline -v 3.7.0

[edit] Linux Instructions

When installing the gem's, if you are prompted to choose a version of a gem, always select the newest version with the 'ruby' tag.

There is currently a bug with the 0.3.1 gem for scRUBYt, where ParseTreeReloaded isn't included as a dependency. Issue the following command to remedy this:

sudo gem install parsetreereloaded --include-dependencies

Now install scRUBYt (This should install all the required libraries mentioned above, except for Ruby):

sudo gem install scrubyt --include-dependencies

[edit] Windows Instructions

When installing the gem's, if you are prompted to choose a version of a gem, always select the newest version with the 'win32' tag.

Now comes a bit of a problem if you happen to be on win32: installing ParseTree. If you have your C compiler well configured, it won’t be a problem - if not, don’t worry, we are working on the issue!

There is currently a bug with the 0.3.1 gem for scRUBYt, where ParseTreeReloaded isn't included as a dependency. Issue the following command (from the command prompt) to remedy this:

gem install ParseTreeReloaded --include-dependencies

and you may also need to install ruby2ruby like this:

gem install ruby2ruby --include-dependencies


Now Install scRUBYt (This should install all the required libraries mentioned above, except for Ruby):

gem install scrubyt --include-dependencies

[edit] Windows CygWin Instructions

If you are trying to run it from Cygwin, check the followings:

  1. Make sure you have ruby (!), gcc, make, openssh and openssl installed in Cygwin
  2. You must install rubygems manually. I’ve extracted it in /lib/ruby and run “ruby setup.rb”
  3. When you call gem inside Cygwin, you must use the -r switch “gem install -r …”
  4. Follow the instructions to install scRUBYt. Make sure you choose the ruby version of all dependencies (and not the mswin32).
  5. Also make sure that if you have the native version of ruby installed on your machine, remove it from your PATH variable. Also remove the RUBYOPT variable from your system (NOTE: there may be a way to keep the 2 versions running but I haven’t found it yet)
  6. If ruby_inline complains about the permissions of your home folder, make sure it is group and world readable only (chmod g=r,o=r ~)

By doing all these, you should be able to have the google extractor from the first tutorial running. I’ve tried it on an XP and a Vista machine and it works on both of them.

Additional instructions from jayp - It is meant to complement the above instructions

  1. I followed the cygwin instructions from the scrubyt wiki
  2. Download cygwin from http://www.cygwin.com
  3. I read this cygwin install tutorial ( http://www.physionet.org/physiotools/cygwin/ ), pay attention to the “Select Packages” portion of the install process (the cygwin instructions from the scrubyt wiki will tell you which packages you need to select – I had to look under each section to find the specific packages and I didn’t know exactly which gcc packages to select, so I selected them all) HERE’S WHERE THE PACKAGES ARE LOCATED: Devel (gcc, make) Net (openssh, openssl) Interpreters (ruby)
  4. Once cygwin is installed you should end up with an executable file on your desktop
  5. Download the rubygems package from rubyforge, I chose the zip package and unzipped it to my C:\cygwin\lib\ruby directory so I ended up with rubygems located at: C:\cygwin\lib\ruby\rubygems-0.9.4
  6. Click the cygwin executable on your desktop
  7. cygwin interface will open, it will open to your home directory which looks something like: USER@Computername
  8. type without quotes but with the space “cd ..” and you’ll end up at /home
  9. type without quotes but with the space “cd ..” again and you’ll now be at your c:\cygwin directory
  10. now type the path to your rubygems-0.9.4 folder like this: cd /lib/ruby/rubygems-0.9.4
  11. once at this folder, your now ready to setup rubygems like this: ruby setup.rb (I was receiving a -ubygems error, this was resolved when I uninstalled my native ruby installation and unset my path variable. During research online I noticed info about this error, so a simple “-ubygems” search should resolve this issue for you.)
  12. your now ready to install the gems using the wiki instructions (Note: during my install I ended up with multiple versions of rubyinline, parsetree and ruby2ruby – these were removed by using: gem uninstall ruby2ruby and selecting from the list provided to remove the unneeded version)
  13. Almost there…your probably going to want to play with scrubyt, so go to http://rubyforge.org/frs/?group_id=2836 and download the scrubyt-examples-0.3.0 (or the latest package that include examples). I chose the zip and unpackaged it to my cygwin user directory, if we use the account info mentioned previously USER@computername, it would be C:\cygwin\home\USER\scrubyt-examples-0.3.0
  14. Alrighty then—run that google extractor example like so (given the parameters I’ve used above): Easiest to close your cygwin and restart it type: cd .. (click enter) type: cd .. (click enter) type: cd /home/USER/scrubyt-examples-0.3.0/examples/misc/google/ (click enter) type: ruby test.rb (you may need to change the first line of test.rb to ( require ‘rubygems’ ))

I sure hope this helps someone else out, it is basically a cygwin for newbies, written by a newbie so be kind please !!!

Personal tools