Created
April 16, 2014 03:53
-
-
Save inem/10804730 to your computer and use it in GitHub Desktop.
Chassis failing experiment
This file contains 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
require 'rubygems' | |
require 'bundler/setup' | |
require 'chassis' | |
class Post | |
attr_accessor :id, :title, :text | |
end | |
repo = Chassis::Repo.default | |
puts repo.empty? Post #=> true | |
post = Post.new | |
post.title = 'Such Repos' | |
post.text = 'Very wow. Much design.' | |
repo.save post | |
puts post.id #=> 1 |
This file contains 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
/Projects/my/repositories-experiment > ruby app.rb | |
/Users/inem/.rvm/gems/ruby-2.0.0-p353@my/bundler/gems/chassis-2504d3d17788/lib/chassis/strategy.rb:83:in `included': private method `include' called for Chassis::Repo:Class (NoMethodError) | |
from /Users/inem/.rvm/gems/ruby-2.0.0-p353@my/bundler/gems/chassis-2504d3d17788/lib/chassis/repo.rb:19:in `include' | |
from /Users/inem/.rvm/gems/ruby-2.0.0-p353@my/bundler/gems/chassis-2504d3d17788/lib/chassis/repo.rb:19:in `<class:Repo>' | |
from /Users/inem/.rvm/gems/ruby-2.0.0-p353@my/bundler/gems/chassis-2504d3d17788/lib/chassis/repo.rb:18:in `<module:Chassis>' | |
from /Users/inem/.rvm/gems/ruby-2.0.0-p353@my/bundler/gems/chassis-2504d3d17788/lib/chassis/repo.rb:1:in `<top (required)>' | |
from /Users/inem/.rvm/gems/ruby-2.0.0-p353@my/bundler/gems/chassis-2504d3d17788/lib/chassis.rb:63:in `require_relative' | |
from /Users/inem/.rvm/gems/ruby-2.0.0-p353@my/bundler/gems/chassis-2504d3d17788/lib/chassis.rb:63:in `<top (required)>' | |
from app.rb:3:in `require' | |
from app.rb:3:in `<main>' |
This file contains 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
source 'https://rubygems.org' | |
gem 'chassis', git: 'https://github.com/ahawkins/chassis.git' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment