Ruby 1.9 SVN Bindings in Ubuntu 12.04 - ruby

I need some help getting the Ruby SVN bindings to work under Ubuntu 12.04
We're using:
Ruby 1.9.3
Ubuntu 12.04
SVN 1.6.17
We are not using rvm.
I tried an apt-get install libsvn-ruby, but it doesn't actually seem to install the bindings. When I try to require svn/core, Ruby complains that it does not exist. Looking at a description of the package, it says it's a dummy package.
I have spent quite a lot of time trying to create the bindings manually by checking out http://svn.apache.org/repos/asf/subversion/tags/1.6.17 and following the instructions in subversion/bindings/swig/INSTALL, but I always end up getting errors when I try to run make swig-rb
None of my Google searches return useful information about the errors, or about how I'm supposed to get the bindings to work. Can anyone give me some steps to get Ruby 1.9 talking to SVN?

This is because there are no ruby bindings for ruby 1.9 - there are only ruby-bindings for ruby 1.8.

Related

Specify ruby version to use with Pik

I need to run two Ruby apps on a Windows 2008 server. So, I'm thinking to install Pik for the job (I understand I could use also RVM but the install process doesn't seem very 'stable' to me).
Before installing Pik, however, I'd like to know if there is a way to specify which Ruby version should be used for each app. Something like a .ruby-version file. I have looked for the answer on the official Pik repo but I couldn't find anything about it.
In my opinion, Ref 1, Ref 2 are the two simple references you could have to install different ruby versions using Pik in Windows.
After setting up the environment correctly, you could just use the command similar to RVM.
pik use ruby-2.0.0-p0
Then ruby -v will show ruby 2.0.0p0. So, for different projects, from with in each project folder choose which ruby you want to have.
Hope it helps :)

How do i install Command-T, Pathogen, and not using RVM?

I used brew install to install ruby (as opposed to RVM). I have on my system installed ruby 1.9.3p0. (OSX Lion)
I'm trying to install Command-T via pathogen. I can normally run rake, make, ruby, whatever, but when i enter into the 'Command-T' directory and try to run rake make it says Could not find rake-0.8.7 in any of the sources.
I also cant run any normal ruby command. just ruby --version produces the same errors.
I know this has to do with below... but i dont know how to actually fix it.
Most installation problems are caused by a mismatch between the
version of Ruby on the host operating system, and the version of Ruby
that Vim itself linked against at compile time. For example, if one is
32-bit and the other is 64-bit, or one is from the Ruby 1.9 series and
the other is from the 1.8 series, then the plug-in is not likely to
work.
As such, on Mac OS X, I recommend using the standard Ruby that comes
with the system (currently 1.8.7) along with the latest version of
MacVim (currently version 7.3). If you wish to use custom builds of
Ruby or of MacVim (not recommmended) then you will have to take extra
care to ensure that the exact same Ruby environment is in effect when
building Ruby, Vim and the Command-T extension.
I tried temporarily moving the entire Cellar directory out of /usr/local (for those arent familiar, its where homebrew installs ruby and everything else).
In terminal if i run which ruby it works right.. yet when i rune rake make in the Command-T folder it still gives the same error
nevermind... all i had to do was run /usr/bin/rake make
how thats different than just removing the Cellar folder temporarily so that by default shell uses that path, i have no idea, but it worked.
I had similar problem on Fedora.
In the end, I found we should install rubygem-rake and ruby-dev package first.
After installing both, compile your Vim with "./configure --enable-rubyinterp",
then Commend-T will be ok.

Why doesn't rails.vim recognize any gems that I install?

I'm a ruby and vim newbie. I recently installed the rails.vim plugin and all the commands work fine apart from the commands to create a new Rails project. Every time I do this it says rails is not installed on my system, but it is! It also acts up when I create a class that requires a gem that I've installed. Can anyone help with this?
Did you rvm use system before building / brew install-ing macvim? I didn't and got many errors. Doing rvm use system beforehand fixed things up for me.

Installing Ruby on Mac 1.9.2, still getting 1.8.7 even though path changed

I'm on a Mac running 10.6.4 Snow Leopard, and apparently ruby comes ready to go. But I'm new to Ruby, trying to learn the Rails framework, and so i decided to install the latest version 1.9.2. I followed the instructions here, but after I compile and install, when I run ruby -v I'm still getting 1.8.7. Anyone can help a noob out?
When I use which ruby I am getting usr/local/bin/ruby, so the path has changed and is correct.
UPDATE:
It seems I was having issues because I was using two login files to set my path (.bash_login and .profile). You can only use one, and the first one that exists and is readable will be used. I eventually switched to RVM and used .bash_login to load RVM into shell.
Well, the sw isn't lying to you. So something is not as you expect.
Try /usr/local/bin/ruby -v and see what version it is.
Added: Also, try locate ruby|more to see where the ruby files are on your system.
You may need to change your path to use your newly installed copy of ruby.
Added more: did you add the Path to your ~/.profile file as the instructions tell you to do in step 1?
Did you restart your terminal session after changing the ~/.profile file? (Quit and restart terminal.)

Upgrading Ruby on Mac OS X

I am reading the book Programming Ruby and am looking to upgrade the version of Ruby on my computer. I run Mac OS X Snow Leopard and doing ruby -v in the command line shows I am running Ruby 1.8.7.
I installed MacPorts and ran the sudo port install ruby19 command but whenever I type ruby -v, it still shows Ruby 1.8.7.
Could anyone help with this? Thank you.
The tool "rvm" is pretty good. It stands for Ruby Verson Manager I think, and the developer is good at support in the irc channels. You can install multiple versions of ruby along side each other pick the ones you want to use.
http://rvm.io
You have to use ruby19 to run ruby if you installed it that way. You can also use irb19, and ri19.
I updated the link to RVM in one of the answers, but also a quick poll of some friends doing Ruby dev currently revealed a preference for rbenv as a ruby environment manager: http://github.com/sstephenson/rbenv/
As mentioned in hvgotcodes answer, RVM seems to be a great way of handling this.
I recently started learning Ruby (and Rails) myself, and this[1] tutorial has a great section on using RVM. I'd highly recommend you give it a go, it's especially handy so that you can follow different tutorials on different versions of Ruby if you wish.
[1] http://railstutorial.org/book#sec:rubygems
As #Andrew Grimm eluded, the problem you are having is likely due to a problem in your $PATH variable. Since macports typically installs stuff in /opt, modifying your $PATH variable to:
$ export PATH=/opt/local/bin:$PATH
Will most likely help. However, I would urge you to look into RVM as #hvgotcodes recommends.

Resources