Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

linux(ubuntu)ÏÂruby¿ª·¢»·¾³´î½¨

env setup
linux(ubuntu)ÏÂruby¿ª·¢»·¾³´î½¨£¬°üÀ¨Ò»Ð©³£¼ûÎÊÌâ½â¾ö
×¢Ò⣬±¾ÎÄÖ»ÊÇÎÒÔڴrubyѧϰ»·¾³Ê±µÄһЩ±Ê¼Ç£¬ÒòΪÊÇÓÃgedit±à¼­µÄ£¬ËùÒÔ¸ñʽ»¯²»ÊǺܺã¬ÁíÍ⣬ֻÊDZ¸Íü¶øÒÑ¡£
2010.1.19
1. install ruby
$ tar xzf ruby-1.8.7-p248.tar.gz
$ mv ruby-1.8.7-p248 ruby187
$ cd ruby187/
$ ./configure
$ make
owen@owen-desktop:~/softinstall/ruby/ruby187$ make test
test succeeded
owen@owen-desktop:~/softinstall/ruby/ruby187$ sudo make install
owen@owen-desktop:~/softinstall/ruby/ruby187$ ruby -version
ruby 1.8.7 (2009-12-24 patchlevel 248) [i686-linux]
-e:1: undefined local variable or method `rsion' for main:Object (NameError)
owen@owen-desktop:~/softinstall/ruby/ruby187$ which ruby
/usr/local/bin/ruby
2. intall Rails through RubyGems
2.1 intall gems
$ tar xzf rubygems-1.3.4.tgz
$ cd rubygems-1.3.4/
$ sudo ruby setup.rb
Installing RubyGems
Installing gem executable
Removing old source_cache files
Removing old RubyGems RDoc and ri
Installing rubygems-1.3.4 ri into /usr/local/lib/ruby/gems/1.8/doc/rubygems-1.3.4/ri
Installing rubygems-1.3.4 rdoc into /usr/local/lib/ruby/gems/1.8/doc/rubygems-1.3.4/rdoc
------------------------------------------------------------------------------
Oh-no! Unable to find release notes!
------------------------------------------------------------------------------
RubyGems installed the following executables:
    /usr/local/bin/gem
2.2 install rails through RubyGems
sudo gem install rails --include-dependencies
3. create a simple App
н¨Ò»¸öĿ¼mkdir rubydev
cd rubydev
ʹÓÃrailsÃüÁî´´½¨web app
rails hello
ÕâÑùÒ»¸ö½ÐhelloµÄwebÓ¦ÓóÌÐò¿ò¼Ü¾Í´´½¨ºÃÁË£¬ÏÖÔÚÐèÒª×öµÄ¾ÍÊÇÌí¼Ó×Ô¼ºµÄÒµÎñÂß¼­
cd hello
ʹÓÃÈçÏÂÃüÁî´´½¨Ò»¸öÃûΪAppµÄ¿ØÖÆÆ÷
ruby script/generate controller App
Õâʱ¿ÉÄÜ»á³öÏÖÈçÏ´íÎ󣬱¨¸æÎÞ·¨¼ÓÔØopenssl¿â£º
owen@owen-desktop:~/devspace/rubydev/hello$ ruby script/generate controller App
/usr/local/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:271:in `require_frameworks': no such


Ïà¹ØÎĵµ£º

LinuxÖ÷ÒªshellÃüÁîÏê½â

s
hellÊÇÓû§ºÍLinux²Ù×÷ϵͳ֮¼äµÄ½Ó¿Ú¡£LinuxÖÐ
ÓжàÖÖshell£¬ÆäÖÐȱʡʹÓõÄÊÇBash¡£±¾Õ½²ÊöÁËshellµÄ¹¤×÷Ô­Àí£¬shellµÄÖÖÀ࣬shellµÄÒ»°ã²Ù×÷¼°BashµÄÌØÐÔ¡£
¡¡¡¡Ê²Ã´ÊÇshell
¡¡¡¡LinuxϵͳµÄshell×÷Ϊ²Ù×÷ϵͳµÄÍâ¿Ç£¬ÎªÓû§Ìá
¹©Ê¹ÓòÙ×÷ϵͳµÄ½Ó¿Ú¡£ËüÊÇÃüÁîÓïÑÔ¡¢ÃüÁî½âÊͳÌÐò¼°³ÌÐòÉè¼ÆÓïÑÔµÄͳ³Æ¡£
¡¡¡¡s ......

linux sort ÃüÁîÏê½â

     
sortÃüÁîµÄ¹¦ÄÜÊǶÔÎļþÖеĸ÷ÐнøÐÐÅÅÐò¡£sortÃüÁîÓÐÐí¶à·Ç³£ÊµÓõÄÑ¡ÏÕâЩѡÏî×î³õÊÇÓÃÀ´¶ÔÊý¾Ý¿â¸ñʽµÄÎļþÄÚÈݽøÐи÷ÖÖÅÅÐò²Ù×÷µÄ¡£Êµ¼Ê
ÉÏ£¬sortÃüÁî¿ÉÒÔ±»ÈÏΪÊÇÒ»¸ö·Ç³£Ç¿´óµÄÊý¾Ý¹ÜÀí¹¤¾ß£¬ÓÃÀ´¹ÜÀíÄÚÈÝÀàËÆÊý¾Ý¿â¼Ç¼µÄÎļþ¡£
SortÃüÁÖðÐжÔÎļþÖеÄÄÚÈݽøÐÐÅÅÐò£¬Èç¹û ......

LinuxϵͳSudoÃüÁîµÄʹÓÃ˵Ã÷

“Sudo” ÊÇUnix/Linuxƽ̨ÉϵÄÒ»¸ö·Ç³£ÓÐÓõŤ¾ß£¬ËüÔÊÐíϵͳ¹ÜÀíÔ±·ÖÅä¸øÆÕͨÓû§Ò»Ð©ºÏÀíµÄ“ȨÀû”£¬ÈÃËûÃÇÖ´ÐÐһЩֻÓг¬¼¶Óû§»òÆä
ËûÌØÐíÓû§²ÅÄÜÍê³ÉµÄÈÎÎñ£¬±ÈÈ磺ÔËÐÐһЩÏñmount£¬halt£¬suÖ®ÀàµÄÃüÁ»òÕ߱༭һЩϵͳÅäÖÃÎļþ£¬Ïñ/etc/mtab£¬ /etc
/samba/smb.confµÈ¡£ÕâÑùÒ ......

linux Ïß³Ì ½ø³Ì¾­µäÎÄÕÂ


ÓйØlinuxϽø³ÌÓëÏ߳̿´¹ýºÜ¶àÎÄÕ£¬ÎÒ¾õµÄÕâƪ¿ÉÒÔ˵×î¾­µä
£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­
Ò».»ù´¡ÖªÊ¶£ºÏ̺߳ͽø³Ì
°´Õս̿ÆÊéÉϵĶ¨Ò壬½ø³ÌÊÇ×ÊÔ´¹ÜÀíµÄ×îСµ¥Î»£¬Ïß³ÌÊdzÌÐòÖ´ÐеÄ×îСµ¥Î»¡£ÔÚ²Ù×÷ϵͳÉè¼ÆÉÏ£¬´Ó½ø³ÌÑÝ»¯³öỊ̈߳¬×îÖ÷ÒªµÄÄ¿µÄ¾ÍÊǸüºÃµÄÖ§³ÖSMPÒÔ¼°¼õÐ ......

linux¿ñÈËÓï¼

GNU/Linux ²»ÊÇÿ¸öÈ˶¼ÏëÓõġ£Èç¹ûÄãÖ»ÐèÒª´¦ÀíÒ»°ãµÄÊÂÎñ£¬´òÓÎÏ·£¬ÄÇôÄã²»ÐèÒªÁ˽âÏÂÃæÕâЩÁË¡£
¡¡¡¡ÎÒ²»ÊÇÒ»¸ö¿ñÈȵÄ×ÔÓÉÈí¼þ·Ý×Ó£¬ËäÈ»ÎÒºÜϲ»¶×ÔÓÉÈí¼þ¡£ÕâƪÎÄÕÂÒ²²»ÊÇÓÃÀ´ÍÆÐÐ×ÔÓÉÈí¼þÔ˶¯µÄ£¬ËäÈ»ÎÒ¾õµÃ×ÔÓÉÈí¼þÔ˶¯ÊǷdz£ºÃµÄ¡£
¡¡¡¡ÕâƪÎÄÕÂÒ²²»ÊÇÓÃÀ´±È½Ï Linux ºÍ Windows ÄÚºËЧÂÊ£¬Îļþϵͳ£¬ÍøÂç·þÎñµÄ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ