1

I am a total noob to Ruby and Rails, so any help is appreciated about this.

I installed Ruby 2.0.0 using RVM. It got most of the way through, when I got this error message:

Error running 'env GEM_PATH=/Users/victoriamielke/.rvm/gems/ruby-2.0.0-p0:/Users/victoriamielke/.rvm/gems/ruby-2.0.0-p0@global:/Users/victoriamielke/.rvm/gems/ruby-2.0.0-p0:/Users/victoriamielke/.rvm/gems/ruby-2.0.0-p0@global GEM_HOME=/Users/victoriamielke/.rvm/gems/ruby-2.0.0-p0 /Users/victoriamielke/.rvm/rubies/ruby-2.0.0-p0/bin/ruby -d /Users/victoriamielke/.rvm/src/rubygems-2.0.3/setup.rb --verbose', please read /Users/victoriamielke/.rvm/log/ruby-2.0.0-p0/rubygems.install.log Installation of rubygems did not complete successfully.

I also opened up rubygems.install.log, and it said near the end:

ERROR:  While executing gem ... (NoMethodError)
    undefined method `fu_stream_blksize' for #<Gem::Commands::SetupCommand:0x007fcab29f5838>

What caused the failure of Rubygems to install?

Another problem am having is the error message ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2). I tried a Google search on this, which said I needed to find the mysql.sock file. Well, I have never found this file on my computer and could not find out in plain English how to add it or generate it.

kputnam
  • 1,061
  • 7
  • 8
CraneWing
  • 47
  • 1
  • 2
  • 6

1 Answers1

1

Looks like the installation error is a recent known issue. If you're a beginner I recommend using Ruby 1.9.3, since 2.0.0 is brand new and you'll certainly find bugs in both the language implementation and libraries that haven't been tested on 2.0.0 yet.

The second issue is unrelated. It could be that you haven't started MySQL (did you run mysql.server start?), file permissions, MySQL configuration, or any number of other issues. You're not supposed to create /tmp/mysql.sock yourself, it's created automatically by MySQL. Please open a separate question about it.

kputnam
  • 1,061
  • 7
  • 8
  • I tried to install 1.9.3, and I got this error message at the end: – CraneWing Mar 24 '13 at 12:11
  • With my attempt to install 1.9.3, got this message: apple-gcc42 is not available in PATH, try: brew unlink apple-gcc42 && brew link apple-gcc42 and make sure that apple-gcc42 is available in your PATH: which gcc-4.2 – CraneWing Mar 24 '13 at 12:33
  • I decided to do a clean install of Mac OSX. Installed Xcode with command line tools, git, homebrew, rvm. Tried to install 1.9.3 again and got:Error running 'make', please read /Users/victoriamielke/.rvm/log/ruby-1.9.3-p392/make.log. Error at the endof the log said: st.c:520:35: error: implicit conversion loses integer precision: 'st_index_t' (aka 'unsigned long') to 'int' [-Werror,-Wshorten-64-to-32] i = table->num_entries++; ~ ~~~~~~~~~~~~~~~~~~^~ – CraneWing Mar 25 '13 at 11:57
  • Looks like this happens because clang is used by default, but only GCC works (so far). You might try executing `export CC=gcc-4.2` before installing. Here's more info: https://github.com/sstephenson/ruby-build/issues/297 – kputnam Mar 26 '13 at 04:18
  • 1
    I did finally get it installed with using command as shown at [link](http://stackoverflow.com/questions/14072524/error-installing-ruby-with-rvm-osx-10-8). – CraneWing Mar 27 '13 at 11:58
  • I'm glad your persistance was rewarded! I think you should post that link as an answer and accept it, so anyone arriving at this question from Google can quickly identify the fix. – kputnam Mar 28 '13 at 00:48
  • I tried to use the mini Markdown, and it didn't seem to display right. I'm a newbie at everything. The link was http://stackoverflow.com/questions/14072524/error-installing-ruby-with-rvm-osx-10-8 – CraneWing Mar 29 '13 at 18:29