I am using Windows 10 Insider built with Bash enabled. lsb_release shows its Ubuntu 14.04 LTS. So, I was wondering finally I can install RoR on Windows 10 and not use other installers. Because they say its Ubuntu on Windows.
I am following GoRails Guide by Chris Oliver to set RoR on Ubuntu 14.04 Win10. I tried both method using RVM & Rbenv but I ended up with errors
I also asked Chris to write a guide for this on his website and he thought it would be a great idea and but his only concern was opening up ports with Linux Software on Windows and connect to it
I am sure someone will soon find a way to install rails on Windows 10 but meanwhile I want to know if its possible or not? If yes what is it that I am doing wrong. Help me to fix it. Also what should I use for this RVM or RBENV. Which would be better in this case?
(Note: Please let me know if this looks like two different questions. I will edit it. I don't even know if its possible or not. Fixing errors is the later part.)
Here is rbenv error messages:
$ rbenv install 2.3.0
Downloading ruby-2.3.0.tar.bz2...
-> https://cache.ruby-lang.org/pub/ruby/2.3/ruby-2.3.0.tar.bz2
Installing ruby-2.3.0...
BUILD FAILED (Ubuntu 14.04 using ruby-build 20160426-12-gf03f7f8)
Inspect or clean up the working tree at /tmp/ruby-build.20160513120821.313
Results logged to /tmp/ruby-build.20160513120821.313.log
Last 10 log lines:
rm -f ../../../.ext/x86_64-linux/io/wait.so *.o *.bak mkmf.log .*.time
rm -f Makefile extconf.h conftest.* mkmf.log
rm -f core ruby *~
rmdir --ignore-fail-on-non-empty -p 2> /dev/null || true
make[2]: Leaving directory `/tmp/ruby-build.20160513120821.313/ruby-2.3.0/ext/io/wait'
make[1]: Leaving directory `/tmp/ruby-build.20160513120821.313/ruby-2.3.0'
Generating RDoc documentation
./ruby is not found.
Try `make' first, then `make test', please.
make: *** [rdoc] Error 1
RVM error messages:
-> https://cache.ruby-lang.org/pub/ruby/2.3/ruby-2.3.0.tar.bz2
Installing ruby-2.3.0...
BUILD FAILED (Ubuntu 14.04 using ruby-build 20160426-12-gf03f7f8)
Inspect or clean up the working tree at /tmp/ruby-build.20160513120821.313
Results logged to /tmp/ruby-build.20160513120821.313.log
Last 10 log lines:
rm -f ../../../.ext/x86_64-linux/io/wait.so *.o *.bak mkmf.log .*.time
rm -f Makefile extconf.h conftest.* mkmf.log
rm -f core ruby *~
rmdir --ignore-fail-on-non-empty -p 2> /dev/null || true
cooldudeabhi#ACERASPIRE:~$ rvm install 2.3.0
ruby-2.3.0 - #removing src/ruby-2.3.0..
Searching for binary rubies, this might take some time.
Found remote file https://rubies.travis-ci.org/ubuntu/14.04/x86_64/ruby-2.3.0.ta r.bz2
Checking requirements for ubuntu.
Requirements installation successful.
df: Warning: cannot read table of mounted file systems: No such file or director y
ruby-2.3.0 - #configure
ruby-2.3.0 - #download
ruby-2.3.0 - #validate archive
cat: /dev/fd/63: No such file or directory
cat: /dev/fd/63: No such file or directory
The downloaded package for https://rubies.travis-ci.org/ubuntu/14.04/x86_64/ruby -2.3.0.tar.bz2,
Does not contains single 'bin/ruby' or 'ruby-2.3.0',
Only '' were found instead.
Mounting remote ruby failed with status 4, trying to compile.
df: Warning: cannot read table of mounted file systems: No such file or director y
Checking requirements for ubuntu.
Requirements installation successful.
grep: write error: Broken pipe
sort: fflush failed: standard output: Broken pipe
sort: write error
Installing Ruby from source to: /home/cooldudeabhi/.rvm/rubies/ruby-2.3.0, this may take a while depending on your cpu(s)...
ruby-2.3.0 - #downloading ruby-2.3.0, this may take a while depending on your co nnection...
ruby-2.3.0 - #extracting ruby-2.3.0 to /home/cooldudeabhi/.rvm/src/ruby-2.3.0..rvm install 2.3.0
It appears it isn't possible as of build 14342, as this is an issue with Bash on Windows itself [1].
Some internal testing builds are reported to be able to install ruby via RVM, but it does not appear any of these builds are currently available to the 'fast' ring of Windows Insiders at this time [2].
Update: 2016-05-27
One step closer: Build 14352 was released on 2016-05-26 [3]. After running apt-get update && apt-get upgrade I was able to successfully install ruby-2.3.1 using both rvm and rbenv.
As noted in source #1 below, in order to fully utilize rvm I needed to run bash with /bin/bash --login. To achieve this I appended it to the Bash on Ubuntu on Windows shortcut's target field like this:
C:\Windows\System32\bash.exe -c "cd ~ && /bin/bash --login"
Now I can rvm use ruby-2.3.1 --default, gem install rails and rails new banana, however when bundler tries to run, there is an error:
dozers#DRAGONSTONE:~/banana$ bundle
--- ERROR REPORT TEMPLATE -------------------------------------------------------
...
Error details
ArgumentError: parent directory is world writable but not sticky
/home/dozers/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/tmpdir.rb:93:in `ensure in mktmpdir'
/home/dozers/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/tmpdir.rb:95:in `mktmpdir'
/home/dozers/.rvm/gems/ruby-2.3.1/gems/bundler-1.12.5/lib/bundler/vendor/compact_index_client/lib/compact_index_client/updater.rb:29:in `update'
...
--- TEMPLATE END ----------------------------------------------------------------
Unfortunately, an unexpected error occurred, and Bundler cannot continue.
First, try this link to see if there are any existing issue reports for this error:
https://github.com/bundler/bundler/search?q=parent+directory+is+world+writable+but+not+sticky&type=Issues
Update: 2016-06-03
The cat: /dev/fd/63: No such file or directory error is reported to be fixed in an upcoming Windows Insider release [4], but this doesn't seem to be fatal.
As a temporary workaround for the bundler error, issuing chmod -R +t ~/.bundle/cache appears to do the trick and now you have a working rails installation [5].
Sources:
https://github.com/Microsoft/BashOnWindows/issues/9#issuecomment-207978726
https://github.com/Microsoft/BashOnWindows/issues/222#issuecomment-214561156
https://blogs.windows.com/windowsexperience/2016/05/26/announcing-windows-10-insider-preview-build-14352/
https://github.com/Microsoft/BashOnWindows/issues/266#issuecomment-219576351
https://github.com/bundler/bundler/issues/4630#issuecomment-223576426
Related
I have completed installation of ROR, Rails.
When I tried starting the server using
rails s
/Users/xyz/.rbenv/versions/2.0.0-p195/lib/ruby/gems/2.0.0/gems/railties-4.0.0/lib/rails/app_rails_loader.rb:37: warning: Insecure world writable dir /usr/local/Cellar in PATH, mode 040777
/Users/xyz/.rbenv/versions/2.0.0-p195/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:216: warning: Insecure world writable dir /usr/local/Cellar in PATH, mode 040777
=> Booting WEBrick
=> Rails 4.0.0 application starting in development on http://0.0.0.0:3000
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
[2013-09-20 06:19:14] INFO WEBrick 1.3.1
[2013-09-20 06:19:14] INFO ruby 2.0.0 (2013-05-14) [x86_64-darwin12.4.0]
[2013-09-20 06:19:14] INFO WEBrick::HTTPServer#start: pid=87245 port=3000
I tried accessing localhost:3000
But following error is appearing-
Internal Server Error
The server encountered an internal error or misconfiguration and was
unable to complete your request.
Please contact the server administrator, you#example.com and inform
them of the time the error occurred, and anything you might have done
that may have caused the error.
More information about this error may be available in the server error
log.
Output of brew doctor-
brew doctor Warning: Broken symlinks were found. Remove them with
brew prune: /usr/local/bin/unshadow /usr/local/bin/unique
/usr/local/bin/unafs /usr/local/bin/password.lst
/usr/local/bin/mailer /usr/local/bin/lanman.chr
/usr/local/bin/john.conf /usr/local/bin/john
/usr/local/bin/digits.chr /usr/local/bin/alpha.chr
/usr/local/bin/alnum.chr /usr/local/bin/all.chr
/usr/local/Library/LinkedKegs/john
Warning: You have unlinked kegs in your Cellar Leaving kegs unlinked
can lead to build-trouble and cause brews that depend on those kegs to
fail to run properly once built. Run brew link on these:
aircrack-ng
mysql
Warning: You have uncommitted modifications to Homebrew If this a
surprise to you, then you should stash these modifications. Stashing
returns Homebrew to a pristine state but can be undone should you
later need to do so for some reason.
cd /usr/local/Library && git stash && git clean -d -f
Warning: Some installed formula are missing dependencies. You should
brew install the missing dependencies:
brew install freetype gmp libffi libpng libtool nettle p11-kit
Run brew missing for more details.
Warning: /usr/bin occurs before /usr/local/bin This means that
system-provided programs will be used instead of those provided by
Homebrew. The following tools exist at both paths:
certtool
easy_install
easy_install-2.6
git
git-cvsserver
git-receive-pack
git-shell
git-upload-archive
git-upload-pack
phar
phar.phar
php
php-config
phpize
tclsh
tclsh8.5
wish
wish8.5
Consider setting your PATH so that /usr/local/bin occurs before
/usr/bin. Here is a one-liner:
echo export PATH="/usr/local/bin:$PATH" >> ~/.bash_profile You have new mail in /var/mail/gaurangagrawal
Run the commands that brew doctor listed one at a time:
brew prune
brew link aircrack-ng
brew link mysql
brew install freetype gmp libffi libpng libtool nettle p11-kit
it probably wouldn't hurt to update and upgrade:
brew update
brew upgrade
Use brew doctor again to see what's left.
The last complaint it has has to the with the order the directories in your $PATH are set. Use the one of off they provided (export PATH="/usr/local/bin:$PATH" >> ~/.bash_profile) or go in there and take care of it manually.
One more thing, are you using macports? If so you'll need to remove it, it doesn't play nice with home brew. Use this link for more infomation: removing macports, step by step
I've followed the instructions on Poltergeist github page but i keep getting an error that my PhantomJS version is wrong.
Specifically, it says:
Could not find an executable 'phantomjs' that matched the requirements '~> 1.8', '>= 1.8.1'. Found versions were {"/home/marko/projects/irs_machine/bin/phantomjs"=>"50"}.
Now, I have downloaded phantomjs v1.8.1 (and later v1.9.2) so the version is correct. This is really driving me crazy. I use Ubuntu 13.04, but I doubt that's the reason.
Googling for the error returns nothing of use.
Any ideas?
I've solved it!
What I found to be very strange was the fact that the error reported the phantomjs version to be "50" which is impossible.
I've tracked the error down to the "cliver" gem, a gem that detects versions of installed programs. It does so by regex matching the desired version string to the result of
{command} -v
Now, when I run phantomjs -v i get "1.8.1", so what was happening? On closer inspection "1.8.1" wasn't all that I was getting back! To be precise, I got this:
phantomjs -v
Fontconfig warning: "/etc/fonts/conf.d/50-user.conf", line 9: reading configurations from ~/.fonts.conf is deprecated.
1.8.1
I had a fontconf error, and sure enough, the first number it contained was "50". Cliver matches against standard output, so it couldn't get a proper version because the system was writing errors out.
Once I reconfigured the 50-user.conf not to use line 9, the error was gone and poltergeist started working as expected.
In my case, using apt-get to install PhantomJS was installing an older version of PhantomJS. I had to manually install PhantomJS by downloading the tarball, unpacking it, and creating links to the executable in /bin:
If you haven't already, remove the outdated version of PhantomJS you have installed.
Using apt-get, the command for me was sudo apt-get remove phantomjs.
Download the tarball from http://phantomjs.org/download.html.
(You can use, for example, wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.7-linux-x86_64.tar.bz2 to download the x86 version of PhantomJS 1.9.7 from the command lineto the current working directory.)
Unpack the tarball in your home directory.
According to https://askubuntu.com/a/25962/168631, the command is tar xjf phantomjs-1.9.7-linux-x86_64.tar.bz2, depending on which version you downloaded.
Create symbolic links to the phantomjs executable in your /bin.
Following these instructions, I ran:
sudo ln -s <snip>/<unpacked_tarball>/bin/phantomjs /usr/local/share/phantomjs
sudo ln -s <snip>/<unpacked_tarball>/bin/phantomjs /usr/local/bin/phantomjs
sudo ln -s <snip>/<unpacked_tarball>/bin/phantomjs /usr/bin/phantomjs
i also faced the same issue and resolved it by using the phantomjs gem ,which will install the phantomjs based on the platform you are working.
first remove the platform specific phantomjs ,so if you are using ubuntu
sudo apt-get --purge remove phantomjs
sudo rm /usr/bin/phantomjs
sudo ln -s /node_modules/phantomjs/lib/phantom/bin/phantomjs /usr/bin/phantomjs
Try to move phantomjs to your /bin directory.
and Thank you for Helping me!
Long story short, I put this in the terminal
curl https://raw.github.com/gist/1688857/rbenv.sh | sh ; rbenv global 1.9.3-p327-perf
I ended up downloading/installing ruby over my current ruby/rails. I stopped it in time but it was too late. Both my rails and my ruby commands didn't work .....
Originally I installed railsinstaller to get my rails/ruby up and running.
I did rvm implode, removed rvm path in .bash_profile,
removed /etc/rvmrc file as well. I figured the rmv clash with the new ruby that I downloaded.
Originally I used railsinstaller to get ruby/rails up and running.
Then I tried to install railsinstaller but it didn't work! I later uninstalled railsinstaller because I want to try brew.
Here is my .bashrc profile
export PATH="/usr/bin:$PATH"
export PATH="/usr/local:$PATH"
export PATH="/usr/local/bin:$PATH"
export PATH=/usr/local/mysql/bin:$PATH
export PATH="/usr/local/opt/ruby/bin:$PATH"
export DYLD_LIBRARY_PATH=/usr/local/mysql/lib:$DYLD_LIBRARY_PATH
### Added by the Heroku Toolbelt
export PATH="/usr/local/heroku/bin:$PATH"
Here is what I get when I run brew doctor
Warning: Setting DYLD_* vars can break dynamic linking.
Set variables:
DYLD_LIBRARY_PATH
Warning: The /usr/local directory is not writable.
Even if this directory was writable when you installed Homebrew, other
software may change permissions on this directory. Some versions of the
"InstantOn" component of Airfoil are known to do this.
You should probably change the ownership and permissions of /usr/local
back to your user account.
Warning: Experimental support for using Xcode without the "Command Line Tools".
You have only installed Xcode. If stuff is not building, try installing the
"Command Line Tools for Xcode" package provided by Apple.
Warning: You have unlinked kegs in your Cellar
Leaving kegs unlinked can lead to build-trouble and cause brews that depend on
those kegs to fail to run properly once built. Run `brew link` on these:
autoconf
libtool
(I tried brew link above)
Error: Could not symlink file: /usr/local/Cellar/autoconf/2.69/bin/ifnames
/usr/local/bin/ifnames may already exist.
/usr/local/bin may not be writable.
same thing happen with libtool
Warning: Your Xcode is configured with an invalid path.
You should change it to the correct path:
sudo xcode-select -switch /Applications/Xcode.app
When I run brew install ruby .......
NOTE: By default, gem installed binaries will be placed into:
/usr/local/opt/ruby/bin
You may want to add this to your PATH.
Warning: Could not link ruby. Unlinking...
Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
You can try again using `brew link ruby'
==> Summary
🍺 /usr/local/Cellar/ruby/2.0.0-p0: 877 files, 18M, built in 2.7 minutes
There are bash commands that I can not access. I have to source my bashprofile everytime to get some bash commands to work.....
I am new to rails and I am developing a rails app. The rails mvc concepts are easy to grasp, but I didn't pay much attention to.
-paths
-environments
-rbenv
-rvm
-brew
-bash commands
etc
This is the type of thing where you start making the app after installing everything and don't quite know how ruby/rails work under the hood when something breaks.
If someone can point me to the right direction. I will love your help. I will try to research this further myself.
Thanks!
If you need more info please let me know and thanks!
HI HERE IS MY UPDATE
Thanks! so I installed xcode,
I went through this tutorial
https://coderwall.com/p/auvm9g
and installed everything successfully but my computer can't find the ruby/rails that I installed. It came on when the installation finished but I lost it after I exit the terminal.
I did brew doctor
Warning: Setting DYLD_* vars can break dynamic linking.
Set variables:
DYLD_LIBRARY_PATH
Warning: "config" scripts exist outside your system or Homebrew directories.
`./configure` scripts often look for *-config scripts to determine if
software packages are installed, and what additional flags to use when
compiling and linking.
Having additional scripts in your path can confuse software installed via
Homebrew if the config script overrides a system or Homebrew provided
script of the same name. We found the following "config" scripts:
/Library/Frameworks/Python.framework/Versions/2.7/bin/python-config
/Library/Frameworks/Python.framework/Versions/2.7/bin/python2-config
/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7-config
Here is my .bashrc
PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11/bin
export PATH="/usr/local:$PATH"ls
export PATH=/usr/local/mysql/bin:$PATH
export DYLD_LIBRARY_PATH=/usr/local/mysql/lib:$DYLD_LIBRARY_PATH
### Added by the Heroku Toolbelt
export PATH="/usr/local/heroku/bin:$PATH"
Here is my .bash_profile
# Setting PATH for Python 2.7
# The orginal version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/2.7/bin:${PATH}"
export PATH
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into shell session *as a function*
export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)"
export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)"
export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)"
PATH="/usr/local/bin:/usr/local/heroku/bin:/usr/local/mysql/bin:/usr/local/bin:$PATH"
ruby -v
rbenv: ruby: command not found
The `ruby' command exists in these Ruby versions:
1.9.3-p286
rails -v
rbenv: rails: command not found
The `rails' command exists in these Ruby versions:
1.9.3-p286
\curl -L https://get.rvm.io | bash -s stable --ruby
Upgrading the RVM installation in /Users/judyngai/.rvm/
RVM PATH line found in /Users/judyngai/.zshrc.
RVM sourcing line found in /Users/judyngai/.bash_profile /Users/judyngai/.zlogin.
Installing rvm gem in 1 gemsets ERROR: Loading command: install (LoadError)
cannot load such file -- openssl
ERROR: While executing gem ... (NoMethodError)
undefined method `invoke_with_build_args' for nil:NilClass
Upgrade Notes:
* WARNING: Above files contains `PATH=` with no `$PATH` inside, this can break RVM,
for details check https://github.com/wayneeseguin/rvm/issues/1351#issuecomment-10939525
to avoid this warning append #PATH.
* No new notes to display.
my .rvm and .benv are in my Users/judyngai/.rvm
I am pretty sure I have a paths problem, if someone can enlighten me I will be really happy and grateful!
You have a few things going on.
First off, I haven't used railsinstaller, but it looks like a bad deal. Many of these "one-click-install" applications end up leaving you in a mess like you have here. I recommend removing everything rails installer has done and following something like this guide to get you going: https://coderwall.com/p/auvm9g. That does each part separately.
But, if you want to try and fix what you got...
First, looks you have some issues with homebrew according to brew doctor. Largest of which is you need to install Xcode Command Line Tools.
That should also take care the autoconf and libtool warnings.
Looks like you also need change permissions on you /uar/local directory since that's where homebrew puts everything.
Second, installing Ruby through brew is a bad idea. I recommend either rbenv or rvm.
After the reboot which was required to update all the packages,
ruby -v
doesn't work. It says rails is not installed either, but I guess it should be the similar issue. when I do:
sudo apt-get install ruby
It says the newest version is already installed.
When I do:
dpkg -L ruby
I get the following output:
/.
/usr
/usr/bin
/usr/share
/usr/share/doc
[and other stuff..]
But I realized $PATH already includes /usr/bin:
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin
:/sbin:/bin:/usr/games:/home/ubuntu/.rvm/bin
May I know why I'm still getting the following error message?:
The program 'ruby' is currently not installed. You can install it by typing:
sudo apt-get install ruby
My .bashrc already has this too:
PATH=$PATH:$HOME/.rvm/bin
dpkg will be checking in a database that it maintains, whereas trying to execute ruby uses the PATH. If I recall correctly, Ubuntu has a bash handler configured to execute when any command is unresolvable; it seems that it just displays that generic message rather than checking with dpkg first.
It is possible that ruby has disappeared from your filesystem (or at least the directory it previously resided in), or that your PATH was changed.
What do you get if you execute "which ruby" and "where ruby"?
Lastly, Ubuntu can complain that a program cannot be found when it is present. This occurs when running a 64-bit version of Ubuntu, without the necessary x86 libraries installed, and trying to execute a 32-bit binary. However, I recall the error message being more along the lines of "file not found".
Just got a new macbook pro and im having troubles installing rails..
I got ruby 1.8.7 already installed and when i try to write 'gem install rails' i get:
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions into the /Library/Ruby/Gems/1.8 directory.
I also tried to install a higher version of ruby and it said:
Nirs-MacBook-Pro:~ nirohayon$ rvm install 1.9.3
Fetching yaml-0.1.4.tar.gz to /Users/nirohayon/.rvm/archives
Extracting yaml-0.1.4.tar.gz to /Users/nirohayon/.rvm/src
Configuring yaml in /Users/nirohayon/.rvm/src/yaml-0.1.4.
Error running ' ./configure --prefix="/Users/nirohayon/.rvm/usr" ', please read /Users/nirohayon/.rvm/log/ruby-1.9.3-p125/yaml/configure.log
Compiling yaml in /Users/nirohayon/.rvm/src/yaml-0.1.4.
Error running 'make ', please read /Users/nirohayon/.rvm/log/ruby-1.9.3-p125/yaml/make.log
Database file /Users/nirohayon/.rvm/config/packages does not exist.
Installing Ruby from source to: /Users/nirohayon/.rvm/rubies/ruby-1.9.3-p125, this may take a while depending on your cpu(s)...
ruby-1.9.3-p125 - #fetching
ruby-1.9.3-p125 - #extracted to /Users/nirohayon/.rvm/src/ruby-1.9.3-p125 (already extracted)
ruby-1.9.3-p125 - #configuring
Error running ' ./configure --prefix=/Users/nirohayon/.rvm/rubies/ruby-1.9.3-p125 --enable-shared --disable-install-doc --with-libyaml --with-opt-dir=/Users/nirohayon/.rvm/usr ', please read /Users/nirohayon/.rvm/log/ruby-1.9.3-p125/configure.log
There has been an error while running configure. Halting the installation.
ls: /Users/nirohayon/.rvm/rubies/*/bin/ruby: No such file or directory
PLEASE help me, i used windows before and also pretty new to rails, so i dont know much about which path should i direct my terminal. i need a step by step explanation to put rails up and standing on my mac.
Thanks so much!
Nir
Your use of RVM looks a lot like you don't have the developer tools installed. Grab XCode from the App Store, the install the command line tools!
If you really want to install rails on the platform-provided ruby, all you need to do is to sudo gem install rails, for you need to use administrator privileges to isntall gems in the system gemset.
This tutorial helped me install on mac before with OS X 10.6 (I believe). The only thing that was a trouble was the C compiler, which I figured out was the problem from looking up one of the errors.
Probably you will find by looking up the output Error running 'make ', please read /Users/nirohayon/.rvm/log/ruby-1.9.3-p125/yaml/make.log by typing vi /Users/nirohayon/.rvm/log/ruby-1.9.3-p125/yaml/make.log type esc key followed by typing :q! to quit.
As previous answer suggested, you need to get a compiler. I don't know about Xcode specifics, but I tracked down an installer for GCC compiler for Mac on Github I believe but it is probably better straight from Apple packages, (tutorial here)
Also note that if you end up having to use sudo at all, you've probably gone off-track from the guide to install RVM on your system. In which case your path will be somewhere other than in the home directory and the instruction to adjust your source with echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"' >> ~/.bash_profile will not work. Which may end up being somewhere like "/usr/local/rvm/scripts/rvm"