Ruby
global 㨠local ã®ãªãã·ã§ã³ãç解ããã ãã¼ã¸ã§ã³ä¸è¦§ $ rbenv versions system 1.8.7-p374 ï¼1.9.3-p448 (set by /usr/local/rbenv/version) ã·ã¹ãã å ¨ä½ã§ä½¿ç¨ãããã¼ã¸ã§ã³ãåãæ¿ãã(global) $ rbenv global 1.8.7-p374 $ rbenv versions systeâ¦
ã¤ã³ã¹ãã¼ã«å 㯠ã·ã¹ãã ã¯ã¤ãã¨ã㦠/usr/local ã¨ããã ã¾ããRubyå©ç¨è ã staff ã°ã«ã¼ãã«å±ãã¦ãããã¨ãåæã«ãå ¨ã¦ã¼ã¶ã¸ç°å¢å¤æ°ãé©ç¨ããã rbenvã¤ã³ã¹ãã¼ã« $ cd /usr/local $ sudo git clone https://github.com/sstephenson/rbenv.gitâ¦
RDocã§ããã¥ã¡ã³ããä½æããéã«ã¯ã©ã¹å³ãä½æãã¦ãããï¼ã¨ãããã¨ã§ --diagram ãå©ç¨ã§ããããã«ãã(éä¸ã¾ã§)ã RDocã§å³ãä½æããã«ã¯ 以ä¸ã®ããã« --diagram ãªãã·ã§ã³ãæå®ãã¾ãã $ rdoc --help | grep diagram --diagram, -d Generate â¦
Railsããã¸ã§ã¯ãã® lib é ä¸ã¹ã¯ãªãããé ç½®ãã¦ããããRailsç°å¢ã§å®è¡ããæ¹æ³ããã ã¹ã¯ãªãã $ cd /foo/var/rails_project_root/sample $ ls lib hoge.rb å®è¡ $ env RAILS_ENV=development CONFIG_PATH=/usr/local/rails/hoge_project/config/conâ¦
å®æ°(å é ã大æå)ãã¡ã½ãã(def)å ã§ä½¿ç¨ããã¨åºåããããbr ã¡ã½ããã®å¤ã«åºãããå é ãå°æåã«ãã¾ãããã $ ruby -c sample.rb cmdline.rb:29: dynamic constant assignment OPTS = {} ^
http://tmtm.org/mysql/ruby/ MySQL ã® .h(ããããã¡ã¤ã«)ãlibmysqlclient.so ãå¿ è¦ãªã®ã§ã MySQL ã® shared , devel ããã±ã¼ã¸ãã¤ã³ã¹ãã¼ã«ããå¿ è¦ãããã¾ãã åèï¼http://d.hatena.ne.jp/zankey/20080710 ãã¨ã¯ãä¸è¿°ãµã¤ãã®ã¨ããã§ããã $â¦
(SQLite3::IOException) ActiveRecord 㧠SQLite3 ãå©ç¨ãã¦ãã¦ä»¥ä¸ã®ã¨ã©ã¼ãçºçãã¾ããã /usr/local/lib/ruby/site_ruby/1.8/sqlite3/errors.rb:94:in `check': could not open database: disk I/O error (SQLite3::IOException) from /usr/local/libâ¦
ActiveRecord 㧠SQLite3 ãå©ç¨ãã¦ããå ´åã«ä»¥ä¸ã®ã¨ã©ã¼ãçºçãã¾ããã Caught ActiveRecord::StatementInvalid: SQLite3::BusyException: database is locked: SQL /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/connectiâ¦
SQLite3 ã ActiveRecord ã§æä½ããå ´åã«ä»¥ä¸ã®ã¨ã©ã¼ãçºçãã¾ããã Caught ActiveRecord::StatementInvalid: SQLite3::SQLException: SQL logic error or missing database: SQL /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_recâ¦
以ä¸ã®ããã«ï¼ã¤ã®ã¯ã©ã¹ãå©ç¨ãã¦ãã¦ã ã»Hoge::Session::ActiveRecordStore (hoge/sessionactive_record_store.rb) module Hoge module Session class ActiveRecordStore (snip) end end end ã»Hoge::Session (hoge/session.rb) require 'hoge/session/â¦
ActiveRecord ã®ãã¹ã(unit/test)ããã¦ãã¦ä»¥ä¸ã®ã¨ã©ã¼ãçºçãã¾ããã test_1(TestSession): NoMethodError: undefined method `debug' for nil:NilClass /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/base.rb:2313:in `reâ¦
Ruby 㧠MySQL ã«ã¢ã¯ã»ã¹ããã«ããããRuby/MySQL ãå©ç¨ããã¡ã¢ã ã»ç°å¢ ãµã¼ãã¼ï¼MySQL 5.0 ã¯ã©ã¤ã¢ã³ãï¼MySQL 4.0 ã»ã½ã¼ã¹ (snip) HOST = "foo" USER = "user" PASSWD = "passwd" DB = "hoge" PORT = "3306" (snip) begin my = Mysql::new(HOST, â¦
Capistrano ã¨ã¯ï¼ Ruby ã§æ¸ããã ãããã¤ãã¼ã«ã æé rubyã¤ã³ã¹ãã¼ã« gemã¤ã³ã¹ãã¼ã« railsã¤ã³ã¹ãã¼ã« capistoranoã¤ã³ã¹ãã¼ã« å¼ã£ã¦ã¿ã 詳細 1. rubyã¤ã³ã¹ãã¼ã« $ cd /usr/local/src $ wget ftp://ftp.ruby-lang.org/pub/ruby/ruby-1.8.5.tâ¦
perlã§ããCPANã«è©²å½ããgemãã¤ã³ã¹ãã¼ã«ãã[åæ] rubyãã¤ã³ã¹ãã¼ã«ããã¦ããã㨠(èªåã®ç°å¢ã¯1.8.2)[æ¹æ³] gemãåã£ã¦ãã > http://rubyforge.org/frs/?group_id=126 $ wget http://rubyforge.org/frs/download.php/5207/rubygems-0.8.11.tgz $â¦
ããã°ãã®ãã¼ã¸ã§ã³ãä¸ãã£ã¦ã¾ããã管çè I/Fãå¤æ´(追å ï¼)ããã¦ã¾ããã