The Artima Developer Community
Sponsored Link

Ruby Buzz Forum
Build your own Ruby 2.0 (with VM)

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Christopher Williams

Posts: 88
Nickname: sgtcoolguy
Registered: Apr, 2006

Christopher Williams is a Ruby, Rails and Java programmer
Build your own Ruby 2.0 (with VM) Posted: Apr 4, 2006 3:17 PM
Reply to this message Reply

This post originated from an RSS feed registered with Ruby Buzz by Christopher Williams.
Original Post: Build your own Ruby 2.0 (with VM)
Feed Title: Late to the Party
Feed URL: http://cwilliams.textdriven.com/xml/rss20/feed.xml
Feed Description: Ruby. Rails. Stuff.
Latest Ruby Buzz Posts
Latest Ruby Buzz Posts by Christopher Williams
Latest Posts From Late to the Party

Advertisement

In an effort to try and get more people up and running with YARV/Ruby 2.0, here's a quick and dirty guide for building your own copy to play with. This guide will create a safe yarv-based ruby interpreter that won't blow away or override your normal ruby interpreter.

If you already have an installation of ruby with rubygems installed, please temporarily alter your environment variables and remove the RUBYOPT value. This environment variable allows users to set up scripts that should be loaded by default when a ruby interpreter is launched. When building yarv, it will confuse the newly built interpreter, because the file won't exist in it's libraries/load path yet. For Windows users - to remove the variable go to Control Panel - System, click the advanced tab, click the Environment variables button. In the System Variables section, search for RUBYOPT and delete the entry. Please do not forget to add the entry back in when finished playing with YARV - the value should be 'rubygems'.

  1. Install cygwin

    http://www.cygwin.com
    For Windows users only, obviously. Run the setup.exe provided to install via the Internet. Make sure you install these non-default cygwin packages:

    • devel
      • autoconf
      • bison
  2. If you don't have it yet, download a Subversion command line client. You can open a command line (Windows users, that means cygwin) and try out:
    which svn
    If it can't find the file, you need to get a client.
  3. Open a command line. For windows users, this means a cygwin command line.
  4. cd /
  5. svn co http://www.atdot.net/svn/yarv/trunk yarv
  6. mkdir yarv-build
  7. cd yarv
  8. autoconf
  9. cd ../yarv-build
  10. ../yarv/configure --prefix=/usr/local/yarv --program-suffix=-yarv
  11. make
  12. make test
    You will see errors! That's because YARV isn't finished yet. We're trying to help them test on real live ruby code.
  13. make test-all
    You will see errors!
  14. make install

You should now have a ruby/yarv executable in /usr/local/yarv/bin/ruby-yarv(.exe). To test out scripts, just provide the full path to the yarv interpreter when invoking to use YARV.

/usr/local/yarv/bin/ruby-yarv my_favorite_script.rb

Please play around with it, test it out on your own code and help file bug reports with the YARV/Ruby 2.0 team.

Read: Build your own Ruby 2.0 (with VM)

Topic: On Being a Plumber Previous Topic   Next Topic Topic: Rock Solid Rails Deployment

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use