|
|
Line 11: |
Line 11: |
| http://wiki.rubygarden.org/Ruby/page/show/Irb/TipsAndTricks | | http://wiki.rubygarden.org/Ruby/page/show/Irb/TipsAndTricks |
|
| |
|
| ==Install on Solaris== | | ==[Ruby Sybase Install]== |
| | |
| This is for installing Ruby without root access into your home directory.
| |
| Mostly I followed the advice on http://hivelogic.com/articles/2005/12/01/ruby_rails_lighttpd_mysql_tiger and http://santanatechnotes.blogspot.com/2005/12/ruby-and-tk-on-solaris.html.
| |
| | |
| First we need to build readline:
| |
| <pre>
| |
| wget ftp://ftp.gnu.org/gnu/readline/readline-5.1.tar.gz
| |
| tar xzvf readline-5.1.tar.gz
| |
| cd readline-5.1
| |
| ./configure --prefix=/u/eggebr/pkgs/`archpath`
| |
| make
| |
| make install
| |
| cd ..
| |
| </pre>
| |
| | |
| Now for Ruby itself:
| |
| | |
| <pre>
| |
| wget ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.4.tar.gz
| |
| tar xzvf ruby-1.8.4.tar.gz
| |
| cd ruby-1.8.4
| |
| ./configure --prefix=/u/eggebr/pkgs/`archpath` --with-readline-dir=/u/eggebr/pkgs/`archpath`
| |
| make
| |
| make install
| |
| </pre>
| |
| | |
| Assuming we have tk already installed, we can build the tk extension.
| |
| <pre>
| |
| cd ext/tk
| |
| ruby extconf.rb --with-tcl-dir=/usr/local/pkgs/tcl-8.3.5 --with-tk-dir=/usr/local/pkgs/tk-8.3.5 --with-tcllib=tcl8.3 --with-tklib=tk8.3 --enable-tcltk_stubs
| |
| make && make install
| |
| cp -fr /usr/local/pkgs/tk-8.3.5/* /u/eggebr/pkgs/sunos-5.10-i86pc
| |
| </pre>
| |
| | |
| Now, I just need to test things out.
| |
| <pre>
| |
| require 'tk'
| |
| root = TkRoot.new() { title "Hello, world!" }
| |
| Tk.mainloop()
| |
| </pre>
| |
| | |
| To get Rails installed, I'm going to need the crypto stuff working. For whatever reason, the Ruby install can find the crypto library, but the linker doesn't link an absolute path. As a consequence, I have to specify the path to my libcrypto.so.0.9.7 in my LD_LIBRARY_PATH.
| |
| | |
| <pre>
| |
| $ ldd /u/eggebr/pkgs/sunos-5.10-i86pc/lib/ruby/1.8/i386-solaris2.10/digest/md5.so
| |
| libcrypto.so.0.9.7 => (file not found)
| |
| libdl.so.1 => /lib/libdl.so.1
| |
| libcrypt_i.so.1 => /usr/lib/libcrypt_i.so.1
| |
| libm.so.2 => /lib/libm.so.2
| |
| libc.so.1 => /lib/libc.so.1
| |
| libgen.so.1 => /lib/libgen.so.1
| |
| | |
| $ ruby -rmd5 -e 'p MD5.md5 "Hello"'
| |
| /u/eggebr/pkgs/sunos-5.10-i86pc/lib/ruby/1.8/i386-solaris2.10/digest/md5.so: ld.so.1: ruby: fatal: libcrypto.so.0.9.7: open failed: No such file or directory - /u/eggebr/pkgs/sunos-5.10-i86pc/lib/ruby/1.8/i386-solaris2.10/digest/md5.so (LoadError)
| |
| from /u/eggebr/pkgs/sunos-5.10-i86pc/lib/ruby/1.8/md5.rb:6
| |
| $ export LD_LIBRARY_PATH=/usr/local/pkgs/openssl-0.9.7i/lib
| |
| $ ruby -rmd5 -e 'p MD5.md5 "Hello"'
| |
| -e:1: warning: parenthesize argument(s) for future version
| |
| 8b1a9953c4611296a827abf8c47804d7
| |
| </pre>
| |
| | |
| Now we can install Ruby Gems:
| |
| <pre>
| |
| $ wget http://rubyforge.org/frs/download.php/5207/rubygems-0.8.11.tgz
| |
| $ tar xzvf rubygems-0.8.11.tgz
| |
| $ cd ./rubygems-0.8.11
| |
| $ ruby setup.rb
| |
| </pre>
| |
| | |
| With Ruby Gems installed, we're ready to install Rails as per http://www.rubyonrails.org/down
| |
| <pre>
| |
| $ gem install rails --include-dependencies
| |
| </pre>
| |
|
| |
|
| ==Escape invalid XML characters.== | | ==Escape invalid XML characters.== |