OESF Portables Forum
Model Specific Forums => Sharp Zaurus => Zaurus - pdaXrom => Topic started by: dinorex on November 02, 2006, 11:16:00 pm
-
really good to see that Ruby on Rails can be done under pdaXrom env't...
the topic was initiated by another zaurus user, and he is succeeded in doing so... then he told me how to apply this technique and so i deliver the screen captures in my machine.....
The solver is called 'boris' (he should be a member here... well, i don't know his id here... )
original thread outside oesf (but in total chinese... ) (http://www.pumb.org/viewthread.php?tid=24429&extra=page%3D1) :-
little excerpts from there...
Boris writes: -
download ruby 's ipk: -
https://www.oesf.org/forums/index.php?showtopic=19009 (https://www.oesf.org/forums/index.php?showtopic=19009)
download RubyGems and expands so in zaurus: -
http://rubyforge.org/frs/?group_id=126 (http://rubyforge.org/frs/?group_id=126)
ruby setup.rb
after installing Gem, install Rails: gem install rails
install Mongrel: Mongrel is a web application server written by ruby
ipkg install make gcc gcc-headers
gem install mongrel
finally MySQL
feed: http://www.pdaxrom.org/contrib/desertrat/ (http://www.pdaxrom.org/contrib/desertrat/)
ipkg update
ipkg install mysql-server
ipkg install mysql-client mysql-tools (depends on your interest)
default install location :/usr/local/mysql
first time run of mysql, run that first: mysql_install_db
dinorex writes: -
if you want to use 'mysql' account instead of root to run mysql,
refer http://www.linuxquestions.org/questions/sh...ad.php?t=441366 (http://www.linuxquestions.org/questions/showthread.php?t=441366)
user ID = mysql in both /etc/passwd and /etc/groupÂ
then reset the /usr/local/var permission & ownership as mysql ....
after that, the /etc/rc.d/init.d/apachectl start then can runs..... @@
for testing the sample database
in console prompt:
rails sample
under sample directory (in this case: /usr/local/sample)
mongrel_rails start -p 3006 -d
screen captures: -
in IE7 browsers: -
AGAIN, let's honour this topic to the boris and moming: to kick off and deploy the rail sample env't inside the server....
-
The following is the output sample written from a friend writing via Ruby on Rails : -
(screen captured under motif env't [mwm] in pdaxrom beta 4)
[img]http://img257.imageshack.us/img257/4070/mongrelzga3.png\" border=\"0\" class=\"linked-image\" /]
-
great!!! i want to get it running on my C3000 once I get pdaX fully setup there...
-
The bulk update problem mentioned here (and caused by memory issues):
https://www.oesf.org/forums/index.php?showtopic=21376 (https://www.oesf.org/forums/index.php?showtopic=21376)
has been resolved by this nice guy:
http://rubyforge.org/tracker/index.php?fun...id=126&atid=575 (http://rubyforge.org/tracker/index.php?func=detail&aid=10550&group_id=126&atid=575)
Following his instructions I was able to install rails using Meanie's ruby package 1.8.5 from
the beta3 custom feed at the Tyrannozaurus site (http://www.tyrannozaurus.com/feed/beta3/custom/)
root-:) gem list -r
*** REMOTE GEMS ***
GOT HERE! Bulk updating Gem source index for: http://gems.rubyforge.org
6%
...
100%
...
root-:) gem install rails --include-dependencies --version '= 1.1.6' --no-rdoc
Successfully installed rails-1.1.6
Successfully installed rake-0.7.3
Successfully installed activesupport-1.3.1
Successfully installed activerecord-1.14.4
Successfully installed actionpack-1.12.5
Successfully installed actionmailer-1.2.5
Successfully installed actionwebservice-1.1.6
root-:) mkdir ruby-demo
root-:) cd ruby-demo
root-:) rails demo
create
create app/controllers
...
root-:) cd demo
root-:) ./script/server
./script/../config/boot.rb:28:Warning: require_gem is obsolete. Use gem instead.
=> Booting WEBrick...
=> Rails application started on http://0.0.0.0:3000
=> Ctrl-C to shutdown server; call with --help for options
[2007-05-21 14:56:20] INFO WEBrick 1.3.1
[2007-05-21 14:56:20] INFO ruby 1.8.5 (2006-08-25) [armv5tel-linux]
[2007-05-21 14:56:20] INFO WEBrick::HTTPServer#start: pid=1448 port=3000
The installation of the framework itself was rather quick, but an attempt to install the documentation went for >3hrs (with no X):
root-:) top
Mem: 61256K used, 1036K free, 0K shrd, 148K buff, 50632K cached
Load average: 3.32, 2.84, 2.45 (State: S=sleeping R=running, W=waiting)
PID USER STATUS RSS PPID %CPU %MEM COMMAND
1404 root R 45M 1360 78.9 74.4 gem
...
root-:) free
total used free shared buffers
Mem: 62292 60908 1384 0 216
Swap: 269128 58236 210892
so eventually I stopped it.
This shows memory demand of ruby/rails will be high, so a look into
the BleakHouse profiler (http://blog.evanweaver.com/pages/bleak_house) and other memory usage notes (http://blog.methodmissing.com/2007/5/10/rails-memory-usage-case-study/) might be worth it.
The impact of using locally MySQL would be interesting to see.