Install Rails on DSL


Forum: Apps
Topic: Install Rails on DSL
started by: mariusc80

Posted by mariusc80 on Jan. 04 2008,18:03
I've been trying to create a Rails setup on my DSL machine (a K6-2 450 w/ 256MB and DSL 4.0rc3)

Initially I just used it as a NAS (2 HDD x 250GB) but I want to try some new stuff (new 2 me).

What I did:

1. install ruby 1.8.1 from < MyDSL repo - Ruby >

2. install gem:
 - first I tried apt-get
 - then I just got it from the application site. (rubygems-0.8.5 and then rubygems-0.8.3) < RubyForge - RubyGems >

This is as far as I got ...  the main issue is I cannot install gem ...

I have a setup on windows ... with a newer ruby and gem ...

Is there a newer ruby release compiled for DSL ?

Posted by lucky13 on Jan. 04 2008,21:34
No, but I'll see if I can recompile what I have and make a UCI this weekend:
ruby 1.8.6 (2007-09-24 patchlevel 111) [i686-linux]

Posted by mariusc80 on Jan. 05 2008,07:02
That'd be great.
Thanks.

Can you let me know what you did to compile ruby .

Posted by lucky13 on Jan. 05 2008,13:31
Sure, it's straightforward because you don't have dependencies to worry about unless you want to add certain features or widget sets. You need the GCC extension from MyDSL as well as the source.

Then it's a standard ./configure; make; make install. That compiles the defaults. You can run the various README/INSTALL files (I don't recall what all it has off the top of my head) or
Code Sample
./configure --help | less

to get the compile options (you add those to ./configure).

If you're running a frugal install, use the UNC version of GCC (so you can unload it after you compile) and set the prefix wherever you have a persistent partition (such as home or opt). If you have and want to use (for example) /mnt/hda3/opt, you'd add a flag like "--prefix=/mnt/hda3/opt/ruby186" when you run ./configure.

Posted by jpeters on Jan. 05 2008,23:51
Quote (lucky13 @ Jan. 05 2008,08:31)
Quote

If you're running a frugal install, use the UNC version of GCC (so you can unload it after you compile)

Unload a unc?
Posted by mariusc80 on Jan. 06 2008,16:57
More details:

- I have a hdd install.
- I don't have a video card on the system
- I access the system through ssh
- the rest of the system is shared through samba

- I have aliendebs, apache and samba installed.

Posted by mariusc80 on Jan. 06 2008,17:08
I'm getting an error when I try to configure the rub
y compilation setup:
Code Sample

nasman@0[ruby-1.8.6-p111]$ ./configure
checking build system type... i586-pc-linux-gnulibc1
checking host system type... i586-pc-linux-gnulibc1
checking target system type... i586-pc-linux-gnulibc1
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... unsupported
checking how to run the C preprocessor... /lib/cpp
configure: error: C preprocessor "/lib/cpp" fails sanity check
See `config.log' for more details.


And in the log file:
Code Sample

In file included from /usr/lib/gcc-lib/i386-linux/2.95.4/include/syslimits.h:7,
             from /usr/lib/gcc-lib/i386-linux/2.95.4/include/limits.h:11,
             from conftest.c:10:
             /usr/lib/gcc-lib/i386-linux/2.95.4/include/limits.h:117: limits.h: No such file or directory


But this is just one of many.

How do I tell if my compiler is working properly?

This is the version I have:  gcc version 2.95.4 20011002 (Debian prerelease)

Posted by mariusc80 on Jan. 06 2008,23:00
OK, I'm one step closer ... I have ruby 1.8.6 and rubygems 1.0.1

For some of the commands you need admin privileges so use sudo or go in as root

What I did:

Get the compiler
1. download < gcc1-with-libs.unc >
2. run mydsl-load gcc1-with-libs.dsl

Get ruby 1.8.6, compile it, and install it
1. download < Ruby download page > ... get the latest stable source code
2. ./configure
3. make
4. make install

I already had an older ruby ... so I had to link /usr/bin/ruby to /usr/local/bin/ruby

Get rubygems 1.0.1, compile it, and install it
1. download < Ruby gems download page > ... get the latest stable source code
2. ruby setup.rb all

I already had an older gem ... so I had to cp /usr/local/bin/gem /usr/bin/gem

Next I need rails, a database ... and ... luck.

Posted by mariusc80 on Jan. 07 2008,05:40
Code Sample
$ gem install rails --include-dependencies
INFO:  `gem install -y` is now default and will be removed
INFO:  use --ignore-dependencies to install only the gems you list
Bulk updating Gem source index for: http://gems.rubyforge.org
Successfully installed rake-0.8.1
Successfully installed activesupport-2.0.2
Successfully installed activerecord-2.0.2
Successfully installed actionpack-2.0.2
Successfully installed actionmailer-2.0.2
Successfully installed activeresource-2.0.2
Successfully installed rails-2.0.2
7 gems installed
Installing ri documentation for rake-0.8.1...
Installing ri documentation for activesupport-2.0.2...
Installing ri documentation for activerecord-2.0.2...
Installing ri documentation for actionpack-2.0.2...
Installing ri documentation for actionmailer-2.0.2...
Installing ri documentation for activeresource-2.0.2...
Installing RDoc documentation for rake-0.8.1...
Installing RDoc documentation for activesupport-2.0.2...
Installing RDoc documentation for activereis added cord-2.0.2...
Installing RDoc documentation for actionpack-2.0.2...
Installing RDoc documentation for actionmailer-2.0.2...
Installing RDoc documentation for activeresource-2.0.2...
$

This added rails to my system.

Posted by lucky13 on Jan. 08 2008,21:02
jpeters
Quote
Unload a unc?

Unmount. :-)

Posted by jpeters on Jan. 08 2008,22:43
Quote (lucky13 @ Jan. 08 2008,16:02)
jpeters
Quote
Unload a unc?

Unmount. :-)


I thought you were referring to the GCC extension....

Posted by lucky13 on Jan. 09 2008,02:47
Quote
I thought you were referring to the GCC extension....

Yes, I was. There are two gcc UNC extensions. The extension with libs is over 20MB. I only mount when needed then unmount. Does that not make sense?

Posted by jpeters on Jan. 09 2008,06:23
Quote (lucky13 @ Jan. 08 2008,21:47)
Quote
I thought you were referring to the GCC extension....

Yes, I was. There are two gcc UNC extensions. The extension with libs is over 20MB. I only mount when needed then unmount. Does that not make sense?

It is my understanding that unmounting UNC's can be problematic; I know Robert has cautioned against it, and that it can cause the computer to freeze (as opposed to UCI's, which you can mount---unmount all day). Is this no longer an issue??

Posted by lucky13 on Jan. 09 2008,13:15
Quote
Is this no longer an issue??

I'll defer to Robert's wisdom, but I don't recall freezing. I've only used the UNC (with libs) version a couple times because I usually compile from hard drive install.

Which reminds me...

If mariusc80 is still paying attention to this, UCI and UNC extensions really aren't designed for hard drive install use even though they can (and often do) work well. The dsl version of gcc would be a better choice if you're going to compile on a regular basis with your hard drive install.

Powered by Ikonboard 3.1.2a
Ikonboard © 2001 Jarvis Entertainment Group, Inc.