Segment error loading rails

I have downloaded ruby 1.9.1 binaries to c:\ruby191 (I have ruby 1.8.6
under c:\ruby). I then downloaded gems 1.3.1 and ran “gem install rails
–include-dependencies” from c:\ruby191\bin and it ran and came up with
a segment error and killed the rails install.

Any ideas what I am doing wrong?

Thanks

Chris

you gotta try to install rails 2.3. all other previous versions are
not compatible with 1.9.1.

on the other hand: anything could cause an error of which i don’t even
see the error-message…

I get the same error when using rails 2.3 using the command gem install
rails --source http://gems.rubyonrails.org. I am using gem 1.3.1

The error is:

c:/ruby191/lib/ruby/site_ruby/1.9.1/rubygems.rb:405: [BUG] Segmentation
fault ruby 1.9.1p0 <2009-01-30 revision 21907> [i386-mswin32]

Thanks

I have battled with all sorts of problems over the last 2 days and
almost thought I was there last night when I managed to create a rails
2.3.2 project with ruby 1.9.1 but the mysql driver came up an error
saying it was the wrong version. It seems from research this is a major
problem and that there are as many different solutions to this problem
as there are errors. Since then the whole thing has collapsed.

I foolishly thought that the only way to get to understand how rails was
built was to build it and hack through the problems. In Windows this has
not proved possible for me. The most depressing thing about ruby and
rails is that all the websites are full of fixes for problems, very few
of which seem to work.

The reason people are attracted to ruby and rails is the clean,
powerfull language and the MVC and restful rails environment. However, I
suspect that more people drop out of using it because of the horrendous
amounts of problems in installing it. Maybe rails will never really run
in the Windows environment as with all the extensive searching I have
done the only solution offered is to install the windows version with
the windows installer that I understand is about to be stopped for new
versions. Even the windows 1.8.7 version seems to be 64 bit rather than
32 bit so is not recognised by Netbeans as a ruby system.

I know that most rubyists are linux fans and wish them well as ruby and
rails seems to work better for them. However, even they seem to be
having real problems judging by the number of problems I have seen.

There is a problem with not being able to generate applications with
ruby 191 and rails 2.3.2 that crashes out because it does not generate
the rakefile in the application root. Of all the discussions I have seen
about this problem there is no solution only the experts saying “there
should be a rakefile in the application root” not one of them, that I
can find, has even suggested a possible solution. It seems that the
experts think the problem is solved by saying the rakefile is missing.

I have a feeling that there are no real experts out there just loads of
people like me with very little knowledge attempting to answer people’s
queries without knowing what we are doing.

I have not encountered anyone on these web sites who does not think
highly of ruby and rails but I have met many who have given up because
it is almost impossible to find out how it all hangs together and how to
get it running.

I will keep trying but my energy levels are low and days of searching
for solutions has really only turned up experts who aknowledge the
problem but do not have solutions for them.

On Sat, Mar 14, 2009 at 6:17 PM, Chris Cann <
[email protected]> wrote:

Step 3. Download the latest version of rubygems, 1.3.1 in my case.

Actually, rubygems comes with ruby 1.9.1. Thus, it’s not a seperate
install as it was in previous releases of Ruby.

I have found the solution for setting up a Ruby 1.9.1 environment with
rails alongside another ruby and rails environment in a Windows Vista
environment.

Step 1. Download the Ruby 1.9.1 binaries for windows and copy into a
directory. I have called mine c:\ruby191.

Step 2. Add c:\ruby191\bin to the path statement

Step 3. Download the latest version of rubygems, 1.3.1 in my case.

Step 4. Install gems 1.3.1 Open Command Prompt, go to wherever you have
downloaded rubygems-1.3.1 is and enter c:\ruby191\bin\ruby setup.rb.
This should load gems into your ruby191 environment. Gems is used as an
installer in the ruby world.

Step 5. Download zlib, I had two goes at this to get it right.
http://www.zlib.net/ is the website. Once you have downloaded it copy
zlib1.dll to c:\Windows\System32\ and rename it to zlib.dll. You may
have to reboot at this stage to get the rest of it to work. If you get
the wrong version you will get a segmentation error in the next step.

Step 6. go to c:\ruby191\bin\ in command prompt and type “gem install
rails --source http://gems.rubyonrails.org/” to download rails 2.3.0
RC1. See http://rubyonrails.org for these instructions as it “edge”
rails.

Step 7. I then created a new project using NetBeans 6.5, and it seemed
to have worked, it recognised the right version of ruby and rails, (it
sould work if you do it the normal way with the command prompt). I have
not done anything in the project yet but will update you with any issues
I encounter. It has taken many hours to get to this stage.

Unfortunately windows users are in the minority with ruby/rails users so
you will need to learn how to install binaries and rails as the bloke
who used to write the windows loaders has given up doing it. I could not
find any documentation on how to load ruby binaries and rails or any
other framework environments in one document. It took me a while to get
this far and I am not sure if I have done it correctly. I will let you
know.

Conrad T. wrote:

On Sat, Mar 14, 2009 at 6:17 PM, Chris Cann <
[email protected]> wrote:

Step 3. Download the latest version of rubygems, 1.3.1 in my case.

Actually, rubygems comes with ruby 1.9.1. Thus, it’s not a seperate
install as it was in previous releases of Ruby.

Conrad

I seem to have rubygems 1.3.1 on my system already

Thanks

Chris

Conrad T. wrote:

On Sat, Mar 14, 2009 at 6:17 PM, Chris Cann <
[email protected]> wrote:

Step 3. Download the latest version of rubygems, 1.3.1 in my case.

Actually, rubygems comes with ruby 1.9.1. Thus, it’s not a seperate
install as it was in previous releases of Ruby.

I think I have misinterprited what you mean. I should not have updated
rubygems, is that what you are saying? If so do I have to start from
scratch or can I remove rubygems 1.3.1?

Chris

I have deleted all my ruby191 stuff and recreated it from scratch by
downloading the binaries of ruby 191 into c:\ruby191, (path has
c:\ruby191\bin) as I already have ruby 186 under c:\ruby\bin.

After getting netbeans 6.5 (6.7m2 latest build) to recognise my new
environment I then installed mysql gem, the latest, and succesfully
created a project but was unable to create the database, rake db:create
failed. The error is a segmentation fault in ruby 1.9.1 caused by
/mysql-2.7.3-x86-mswin32/ext/mysql.so.

Any ideas?

Chris