|
|
||||||
|
#1
|
|
|
|
|
I'd like to include a complete version of Ruby, including all the
necessary libs, in the source tree for our internal app. That will allow our unit tests/QA procedure/app deployment scripts to take responsibility for upgrades to Ruby as well. To do this, I of course need to include /usr/lib/ruby/* and /usr/bin/ruby. And to set the PATH to use our local Ruby. But it seems that I need to do more: $ irb irb(main):001:0> $: => ["/usr/lib/ruby/site_ruby/1.8", "/usr/lib/ruby/site_ruby/1.8/i386-linux", "/usr/lib/ruby/site_ruby", "/usr/lib/site_ruby/1.8", "/usr/lib/site_ruby/1.8/i386-linux", "/usr/lib/site_ruby", "/usr/lib/ruby/1.8", "/usr/lib/ruby/1.8/i386-linux", "."] Where are those paths located? strings ruby didn't turn them up. I need to be able to tell it to use the app's private ruby installation. In general, has anyone done anything like this? What was their experience? How would you recommend going about doing this? |
|
|
|
#2
|
|
|
|
|
Robert James wrote:
[..] > "/usr/lib/ruby/site_ruby/1.8/i386-linux", "/usr/lib/ruby/site_ruby", > "/usr/lib/site_ruby/1.8", "/usr/lib/site_ruby/1.8/i386-linux", > "/usr/lib/site_ruby", "/usr/lib/ruby/1.8", > "/usr/lib/ruby/1.8/i386-linux", "."] > > Where are those paths located? strings ruby didn't turn them up. I > need to be able to tell it to use the app's private ruby installation. > > In general, has anyone done anything like this? What was their > experience? How would you recommend going about doing this? It's compiled in at build time, I think. Check out ruby config. I think I'd try building it from source and installing in a custom directory for example /opt/myruby. Then when you install it on the target machines you put it in the same place. |
|
#3
|
|
|
|
|
On 1/1/07, S. Robert James <srobertjames> wrote:
> I'd like to include a complete version of Ruby, including all the > necessary libs, in the source tree for our internal app. I'm not sure if this is applicable in your particular situation, but you can change $: at runtime using the "shift" and "unshift" methods. You could modify your Ruby scripts to change $: as the first thing they do, so all the paths point to your local version of Ruby. Wayne |
|
#4
|
|
|
|
|
S. Robert James wrote:
> Where are those paths located? strings ruby didn't turn them up. I > need to be able to tell it to use the app's private ruby installation. > > In general, has anyone done anything like this? What was their > experience? How would you recommend going about doing this? You can install Ruby anywhere by getting the source code and running something like: /configure --prefix=/your/favorite/directory make make install Then, you should make sure that the right version is used when running your project. Make sure that: * this install of ruby is in the $PATH * your scripts include the full path to your ruby executable in the #!... line Is that what you were looking for ? Vince |
|
#5
|
|
|
|
|
On 1/1/07, S. Robert James <srobertjames> wrote:
> In general, has anyone done anything like this? What was their > experience? How would you recommend going about doing this? I don't really have any experience with this, but I think multiruby in ZenTest does this, and you might be able to use it as a reference. |
|
#6
|
|
|
|
|
Is there a similar method to use a different Ruby version with Rails?
On Tue, 2007-01-02 at 08:17 +0900, Vincent Fourmond wrote: [..] |
|
#7
|
|
|
|
|
matt <matt> wrote:
> Is there a similar method to use a different Ruby version with Rails? i don't know how but i'm sure it is because i've only Rails under jRuby which has it's own ruby install. |
|
|
| Similar Threads | |
| Buiulding multiple versions of Ruby This is the way that I build ruby from the latest svn sources. This allows me to have multiple versions and to compare the performance/behaviour of my builds against the... |
|
| Multiple Ruby versions for testing [Note: parts of this message were removed to make it a legal post.] Hi list, I'm trying to test a gem (managed with Hoe) on my Ubuntu machine. The Ruby from the Ubuntu... |
|
| Running Multiple Versions of Ruby on Debian? Well so far things are going kind of good, I've built my own server and it's sitting in colo running Debian Etch and Ruby 1.8.6 (built from source) Now me being me I... |
|
| Multiple VS Versions on Same Machine Hi, I have a number of questions regardingVisual Studio and SQL Server. I'm running Vista Ultimate SP1 and have Microsoft Office 2007 Ultimate installed. I also already... |
|
| Multiple versions on one machine? Suppose I was trying to install MS Office on 1 machine, two versions, say 98 and 2003. What issues do I have to contend with? |
|
|
All times are GMT. The time now is 01:33 AM. | Privacy Policy
|