:before and :after callouts would be useful during installation.
We need separate load and run time dependencies.
Use case. During opal development – ’stable’ copy installed, but want to test local ‘updated’ copy.
Posted in Requirements | Leave a Comment »
To remove or disable Ruby 1.9 built-in rubygems support
# disable_rubygems-1_9.rb
##
# Remove the automatically loaded RubyGems instance in Ruby 1.9
#
# The best way to run this is using the command-line switch '-r'.
#
# e.g ruby -r./disable_rubygems-1.9
#
# Remember to fully qualify the file name for this script to reflect where you install it.
#
# You can also set the environment variable RUBYOPT to do this every time ruby loads.
#
# e.g. (bash) set RUBYOPT="-r./disable_rubygems-1.9"; export RUBYOPT
# (tcsh) setenv RUBYOPT "-r./disable_rubygems-1.9"
##
##
# Steps
# 1) Remove appropriate modules
# 2) Clean any automatically loaded gems from the load path
##
rubygems_installed = false
if defined?(Gem) then
rubygems_installed = true
end
if rubygems_installed
# Remove the 'gem' method from the Kernel
module Kernel
remove_method(:gem)
end
# Remove the Gem module - just undefine the constant that references it
Object.class_eval { remove_const("Gem") }
# Clean the loadpath of any loaded gems
$: = $:.reject {|path| path =~ /gem/}
end
Posted in ruby | Tagged ruby1.9, rubygems | Leave a Comment »
To remove or disable Ruby 1.9 built-in rubygems support
See
git://github.com/tflynn/ruby19-norubygems.git
For a repository that contains patched versions of ruby 1.9 without integrated rubygems support.
As of early-ish 2008-06-29, see branch
patched-svn-17710
Only lightly tested, but seems to work.
Posted in ruby | Tagged ruby1.9, rubygems | Leave a Comment »
Ruby 1.9 includes a built-in copy of RubyGems (indeterminate version)
So, an explicit “require ‘rubygems’” is no longer required.
e.g. – “require ‘rake’” is now sufficient to load the latest version of the ‘rake’ gem.
The following gems also appear to be included (‘built in’) to Ruby 1.9
- rake 0.8.0
( A little later)
As far as I can see, the pre-1.9.0 rubygems ‘custom require’ hook is no longer used in Ruby 1.9. It appears to be ‘baked in’ to the main Ruby interpreter. (Please, show me I’m wrong!) The consequences:
- Without intervention, ‘require’ will not only search standard ruby libraries, but will always include and automatically load (the most recent) version of a gem that satisfies the name specified in the ‘require’.
- I’ve not (yet) found any way to disable this behavior.
- Anyone who wants to do something other than use rubygems (Oh heresy!) has to either:
- Try to hook the require (ala Ruby 1.8.x / Rubygems) (Don’t see how)
- Name their classes/packages with a name other than any standard library or gem name.
Posted in ruby | Tagged ruby, ruby1.9, rubygems | 2 Comments »
Problems installing Gnu readline 5.2 on OS X Leopard. Good explanation.
If you’ve done something similar to:
./configure –prefix=/usr/local/ruby1.9 –with-readline-dir=/usr/local
Remember to create /usr/local/ruby1.9 before you run ’sudo make install’
Posted in ruby | Tagged ruby, ruby1.9 | Leave a Comment »
It should be possible to install in a local mode – i.e. everything in the user’s home directory – as well as in system-wide mode – i.e. in /usr/local/rubyopals.
The local mode will need to have an additional ‘require’ to duplicate the hook installed for the system-level install.
Posted in Requirements | Leave a Comment »
The aopspec format will be:
- A zip fie
- Three subdirectories
- a zip file containing the actual code
- a zip file ? containing metadata (aka opalspec, frozen dependency tree)
- a zip file ? containing opal version info
Posted in Design | Leave a Comment »
There are a number of gems that would make RubyOpals development easier. So, to deal with the bootstrap issue, we can:
- Perform the necessary first-time conversion of the needed gems to opals
- Resolve the dependency tree by hand
- Build a development bootstrap version of opals – e.g. miniopal
Posted in Implementation Notes | Leave a Comment »
RubyOpals should be as independent as possible of Ruby versions
Posted in Requirements | Leave a Comment »