A
Arto Kalishian
I have problems running the latest Ruby 1.8.6 on Windows Vista, and this
is (my guess) due to permission problems.
first of all.. after writing the code in SciTE and pressing GO (build)
the command prompt will appear for a second and disappear.
So I open cmd.exe in administrator mode and run my code.rb from there,
and it would work.. but then again..
the following code would give an error:
require': no such file to load -- yaml (LoadError)
from
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `re
quire'
from test_env.rb:1
I loved Ruby from first sight to the point that I started to hate VB
2005 Express. But VB Express 2005, is to my dissapointment much more
compatible and easier to use on Windows Vista than Ruby. So I beg of you
tell me of a clean and neat way to install Ruby on Vista without
encountering problems. Thanks, arto
================
require ' yaml' # Told you it was easy.
test_array = [' Give Quiche A Chance' ,
' Mutants Out!' ,
' Chameleonic Life-Forms, No Thanks' ]
# Here' s half of the magic:
test_string = test_array.to_yaml
# You see? Kind of like "to_s", and it is in fact a string,
# but it' s a YAML description of "test_array".
filename = ' RimmerTShirts.txt'
File.open filename, ' w' do |f|
f.write test_string
end
read_string = File.read filename
# And the other half of the magic:
read_array = YAML::load read_string
puts(read_string == test_string)
puts(read_array == test_array )
is (my guess) due to permission problems.
first of all.. after writing the code in SciTE and pressing GO (build)
the command prompt will appear for a second and disappear.
So I open cmd.exe in administrator mode and run my code.rb from there,
and it would work.. but then again..
the following code would give an error:
require': no such file to load -- yaml (LoadError)
from
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `re
quire'
from test_env.rb:1
I loved Ruby from first sight to the point that I started to hate VB
2005 Express. But VB Express 2005, is to my dissapointment much more
compatible and easier to use on Windows Vista than Ruby. So I beg of you
tell me of a clean and neat way to install Ruby on Vista without
encountering problems. Thanks, arto
================
require ' yaml' # Told you it was easy.
test_array = [' Give Quiche A Chance' ,
' Mutants Out!' ,
' Chameleonic Life-Forms, No Thanks' ]
# Here' s half of the magic:
test_string = test_array.to_yaml
# You see? Kind of like "to_s", and it is in fact a string,
# but it' s a YAML description of "test_array".
filename = ' RimmerTShirts.txt'
File.open filename, ' w' do |f|
f.write test_string
end
read_string = File.read filename
# And the other half of the magic:
read_array = YAML::load read_string
puts(read_string == test_string)
puts(read_array == test_array )