[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

How to install RoR on chrooted environment

Fibre Optic

9/19/2007 9:10:00 PM

Hello,

i have the following setup:
/home/user1/tmp/root_fs/.....

under above mentioned directory I have whole important things for my
embedded Linux OS i.e /bin, /etc, /lib, /sbin, /usr etc. I have
installed i.e. lighthttpd, ruby. Unfortunately I have hard time with
installing the gem and the rails.

How to install the rails without the gem? Or how to install the gem in
chrooted fs?

Regards,
FO
6 Answers

Jano Svitok

9/19/2007 10:20:00 PM

0

On 9/19/07, Fibre Optic <fibre_optic@go2.pl> wrote:
> Hello,
>
> i have the following setup:
> /home/user1/tmp/root_fs/.....
>
> under above mentioned directory I have whole important things for my
> embedded Linux OS i.e /bin, /etc, /lib, /sbin, /usr etc. I have
> installed i.e. lighthttpd, ruby. Unfortunately I have hard time with
> installing the gem and the rails.
>
> How to install the rails without the gem? Or how to install the gem in
> chrooted fs?
>
> Regards,
> FO

[Obvious note] This question is (at least partially) better asked on
Rails-talk group[/Obvious note]

Nevertheless, if you create your application and call rake
<someting>:freeze, it will copy all needed rails files to vendor/
directory in your app. Just copy that to your chrooted dir.

I'd suppose that installing gem under chroot is pretty similar to the
normal install, provided you have all the stuff that such installation
requires - that means in this case at least ruby and rubygems.

More details how to install rubygems are at
http://docs.rubygems.org/read/chapte...

Jano

Fibre Optic

9/20/2007 8:07:00 AM

0

Jano Svitok wrote:
> On 9/19/07, Fibre Optic <fibre_optic@go2.pl> wrote:
>> Hello,
>
> [Obvious note] This question is (at least partially) better asked on
> Rails-talk group[/Obvious note]
>
> Nevertheless, if you create your application and call rake
> <someting>:freeze, it will copy all needed rails files to vendor/
> directory in your app. Just copy that to your chrooted dir.
>
> I'd suppose that installing gem under chroot is pretty similar to the
> normal install, provided you have all the stuff that such installation
> requires - that means in this case at least ruby and rubygems.
>
> More details how to install rubygems are at
> http://docs.rubygems.org/read/chapte...

First of all thank you Jano for the prompt answer.

I have tried this:
$ rails testapp

then:

$ rake rails:freeze:version

but i receive the following output:

"rake aborted!
No Rakefile found (looking for: rakefile, Rakefile, rakefile.rb,
Rakefile.rb)
/usr/lib/ruby/1.8/rake.rb:1934:in `raw_load_rakefile'
(See full trace by running task with --trace)"

Can you pls tell me step-by-step how to do it?

Regards,
FO

Jano Svitok

9/20/2007 9:57:00 AM

0

On 9/20/07, Fibre Optic <fibre_optic@go2.pl> wrote:
Just a quick hin, I don't have more time now.

> I have tried this:
> $ rails testapp

add:

cd testapp

> then:
>
> $ rake rails:freeze:version

I.e. find your Rakefile within testapp dir, and go there, or anywhere below it.

Fibre Optic

9/20/2007 3:43:00 PM

0

Jano Svitok wrote:
> On 9/20/07, Fibre Optic <fibre_optic@go2.pl> wrote:
> Just a quick hin, I don't have more time now.
>
>> I have tried this:
>> $ rails testapp
>
> add:
>
> cd testapp
>
>> then:
>>
>> $ rake rails:freeze:version
>
> I.e. find your Rakefile within testapp dir, and go there, or anywhere below it.
>

it seems it still doeas not work for some reason...

machine:/tmp/testapp$ rake rails:freeze:version
(in /tmp/0/testapp)
rake aborted!
Don't know how to build task 'rails:freeze:version'


REgards,
FO

Chris Lowis

9/20/2007 5:15:00 PM

0


> machine:/tmp/testapp$ rake rails:freeze:version
> (in /tmp/0/testapp)
> rake aborted!
> Don't know how to build task 'rails:freeze:version'

Should read
rake rails:freeze:gems

type rake -T to get a list of all the rake tasks supplied with rails.


Regards,

Chris
--
Posted via http://www.ruby-....

Fibre Optic

9/20/2007 7:19:00 PM

0

Chris Lowis wrote:
>> machine:/tmp/testapp$ rake rails:freeze:version
>> (in /tmp/0/testapp)
>> rake aborted!
>> Don't know how to build task 'rails:freeze:version'
>
> Should read
> rake rails:freeze:gems
>
> type rake -T to get a list of all the rake tasks supplied with rails.
>

The command "rake rails:freeze:gems" shows the following output:
"(in /tmp/0/testapp)
rake aborted!
undefined method `version' for nil:NilClass

(See full trace by running task with --trace)"

But i have figured out correct syntax of the comand which works a expected:

$ rake rails:freeze:edge TAG=rel_1-2-3


Thank you all for help!

Regards,
FO