This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Create the database schema from the declared models | |
| module ActiveRecord | |
| class SchemaDumper | |
| private | |
| def models | |
| Dir.chdir("app/models") do | |
| Dir["**/*.rb"].map! {|m| m.gsub(/\.rb$/, '').camelize.constantize.table_name} | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| C:\data\brandonh\Dev>jruby -v | |
| jruby 1.6.0 (ruby 1.8.7 patchlevel 330) (2011-03-15 f3b6154) (Java HotSpot(TM) Client VM 1.6.0_21) [Windows XP-x86-java] | |
| C:\data\brandonh\Dev>jruby -S irb | |
| irb(main):001:0> require 'rubygems' | |
| => false | |
| irb(main):002:0> require 'pdfkit' | |
| => true | |
| irb(main):003:0> html = '<html><head><title>Hello World!</title></head><p>Hello World!</p></html>' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| C:\data\brandonh\Dev>jruby -v | |
| jruby 1.6.0 (ruby 1.8.7 patchlevel 330) (2011-03-15 f3b6154) (Java HotSpot(TM) Client VM 1.6.0_21) [Windows XP-x86-java] | |
| C:\data\brandonh\Dev>jruby -S irb | |
| irb(main):001:0> require 'rubygems' | |
| => false | |
| irb(main):002:0> require 'pdfkit' | |
| => true | |
| irb(main):003:0> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| C:\data\brandonh\Dev\rails\ofc>jruby script\console | |
| Loading development environment (Rails 2.3.5) | |
| Errno::ENOENT: No such file or directory - cannot execute | |
| exec at org/jruby/RubyKernel.java:1747 | |
| (root) at C:/jruby-1.6.1/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/commands/console.rb:45 | |
| require at org/jruby/RubyKernel.java:1038 | |
| (root) at script\console:3 |