{"id":355,"date":"2007-08-19T17:03:12","date_gmt":"2007-08-19T21:03:12","guid":{"rendered":"http:\/\/www.dr-chuck.com\/wordpress\/?p=355"},"modified":"2011-12-17T12:23:53","modified_gmt":"2011-12-17T16:23:53","slug":"ruby-fun","status":"publish","type":"post","link":"https:\/\/www.dr-chuck.com\/csev-blog\/2007\/08\/ruby-fun\/","title":{"rendered":"Ruby Fun"},"content":{"rendered":"<p>Well I figured out a few things.<br \/>\nHow to make a ruby app set up to use sqlite3<br \/>\nrails app-name -d sqlite3<br \/>\nHow to properly install sqlite3&#8217;s dll &#8211; put it in ruby\/bin<br \/>\nHow to check to see if you have a gem installed<br \/>\ngem list sqlite3<br \/>\nI am working towards a nice simple version of rails that will run on Windows and Mac from a USB stick.<br \/>\nOn the Mac, I am happy with Locomotive.  On Windows &#8211; I like InstantRails &#8211; but do not like MySql as the database.<br \/>\nThe SQLite browser is dang cool and dang simple to install on both mac and PC.<br \/>\nhttp:\/\/sqlitebrowser.sourceforge.net\/<br \/>\nTextmate is a very very fun editor for the Mac and Rails.  It instant-installs right from Locomotive.  Sweet.<br \/>\nOn the PC &#8211; I like e-texteditor  http:\/\/www.e-texteditor.com\/<br \/>\nThe dang sweetest thing so far is<br \/>\nAfter running<br \/>\nruby script\/generate model Thing<br \/>\nAnd making a simple database migration script like this:<br \/>\nclass CreateThings < ActiveRecord::Migration\ndef self.up\ncreate_table :things do |t|\nt.column :key, :string\nt.column :value, :string\nend\nend\ndef self.down\ndrop_table :things\nend\nend\nThen run this:\nruby script\/console\nAnd type this:\nx = Thing.new\nx.key='123'\nx.value = 'fred'\nx.save\nAbsolutely sweet - able to interact with the ORM from the command line - dang dang dang.  Hib can eat its heart out.\nI still am confused as to why folks don't use SQLite3 all the time for simple stuff - like for teaching.  These one-click installers should all use SQLite3 IMHO.\nAlso I wonder why people ever use anything other than migrations using the DB-independent syntax to populate\/organize tables.  Urg.\nIt is too bad that the ruby \/ rails stuff does not put consistent line-ends in place.   Some things work in vi others fail in notepad.exe - ah well - a good reason to get a sweet editor like TextMate or e-texteditor - and pay for them.\nTTFN - time to go buy some more 1GB USB sticks and a USB-2 controller.\n\n<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Well I figured out a few things. How to make a ruby app set up to use sqlite3 rails app-name -d sqlite3 How to properly install sqlite3&#8217;s dll &#8211; put it in ruby\/bin How to check to see if you have a gem installed gem list sqlite3 I am working towards a nice simple version [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-355","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/posts\/355","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/comments?post=355"}],"version-history":[{"count":1,"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/posts\/355\/revisions"}],"predecessor-version":[{"id":2462,"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/posts\/355\/revisions\/2462"}],"wp:attachment":[{"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/media?parent=355"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/categories?post=355"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/tags?post=355"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}