Hey Mark,

You probably already know about this but a lot of people have been
using rvm for managing multiple ruby versions side by side on a single
machine.

http://rvm.beginrescueend.com/

Each version of ruby will have its own gem environment, which is really nice.

On Fri, Nov 27, 2009 at 1:04 PM, MarkMT <[email protected]> wrote:
> Ok, I seem to have solved my problem... I removed the standard Ubuntu
> ruby 1.8.6 package and installed ruby 1.8.7-p160 from source and also
> reinstalled rubygems. It turned out that by default this installed
> ruby into /usr/local/bin and /usr/local/lib, rather than /usr/bin and /
> usr/lib where the packaged version had been installed.
>
> I then installed the mongrel and bundler gems on the system and
> initially just tried to start bin/merb in my app, but it turned out
> that the bundled gems that have native extentions were looking for a
> ruby .so file in the location it was when compiled previously using
> the packaged 1.8.6 version of ruby. So I just redeployed the whole
> app, which resulted in the bundled gems being reinstalled, presumably
> using the library files generated by the new ruby installation. And
> now it works!
>
> I suspect that the incorrect library file was also the reason it
> didn't work previously (when the original ruby package was still in
> the system). In that case also I just started bin/merb on the server
> without reinstalling the bundled gems. It was only after I removed the
> original ruby that I realized the native extensions were looking for a
> ruby .so file. I guess the fact that the old one was still there
> before I removed ruby 1.8.6 meant that it failed silently.
>
>
> MarkMT wrote:
>> After moving to merb edge recently I've been attempting to redeploy my
>> app to a ubuntu 8.04LTS platform and in the process discovered that
>> the latest version of merb on github makes use of a feature of ruby
>> 1.8.7 that isn't supported in 1.8.6, namely the String method
>> 'start_with?' which is used in merb-assets for dealing with css file
>> paths.
>>
>> In Ubuntu 8.04 the standard packaged version of ruby is 1.8.6. My
>> development machine runs Ubuntu 8.10, which comes with Ruby 1.8.7. I'm
>> not too eager to upgrade my server OS so I figured I would just
>> upgrade ruby. I found some guidance here -
>> http://blog.michaelgreenly.com/2009/04/multiple-versions-of-ruby-on-ubuntu-3.html
>> that suggested installing the new version alongside the old rather
>> than just getting rid of 1.8.6. Since leaving the original version in
>> place seemed like a more conservative approach I elected to try this.
>>
>> I managed to get 1.8.7 installed ok into /opt/ruby/bin and tweaked the
>> path on the first line of bin/merb to point there instead of the
>> regular /usr/bin/ruby1.8. I have nginx running on my server in front
>> of mongrel. However when I start the app with 'bin/merb -c 2 -p 8000 -
>> e production' and point my browser at the server, I get a 404 from
>> nginx. 'ps' confirms that the merb processes are running.
>>
>> I have also installed the latest ruby 1.8.7 build (p160) on my
>> development machine alongside the packaged build (p72) in the same way
>> I did on the server. In this case when I tweak the ruby path in bin/
>> merb and then start the app in either development or production mode
>> it runs fine and I can see it in my browser at localhost.
>>
>> So I'm trying to figure out why this strategy isn't working on the
>> server. Does anyone have any guesses or suggestions of how I might
>> diagnose the problem?
>>
>> I guess my next option is to install 1.8.7 on the server over the top
>> of 1.8.6 rather than trying to have them cohabit.
>
> --
>
> You received this message because you are subscribed to the Google Groups 
> "merb" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/merb?hl=en.
>
>
>



-- 
Dylan Clendenin
831.331.1484

--

You received this message because you are subscribed to the Google Groups 
"merb" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to [email protected].
For more options, visit this group at http://groups.google.com/group/merb?hl=en.


Reply via email to