2012-10-30 33 views
1

好的 - 我想我到處都在搜索,我認爲這應該是一個重複的問題,但仍然沒有基本的vestal_versions(1.2.2)在查看並嘗試多個事物後工作。我很早就開始開發,所以我對其他版本解決方案開放,這些解決方案實際上適用於Rails 3.2和Ruby 1.9.3。如何在Rails 3.2和Ruby 1.9.3上使用Vestal版本解決NoMethodError問題?

回購店主正在尋找另一個冠軍(也許這應該告訴我一些嘿嘿),所以也許它不可能沒有一些TLC,但我會很感激,如果有人已經明白了。

謝謝你的時間!

這裏是我的情況:

  • 最大OS X 10.8.2
  • MAC端口:紅寶石1.9.3p194(2012-04-20修訂35410)x86_64的-darwin11]
  • 的Rails 3.2。 8

在我的Gemfile

stuff... 
gem 'mysql2' 
gem 'vestal_versions', :git => 'git://github.com/laserlemon/vestal_versions.git' 
more stuff... 

捆告訴我,我已經有了: - 使用vestal_versions(1.2.2)從混帳://github.com/laserlemon/vestal_versions.git(在主機)

我的模型:

class StoryPage < ActiveRecord::Base 
    versioned 

    belongs_to  :story 

    attr_accessible :page_num, :title, :story_version, has_been_deleted, :content 
end 

從我的控制器:

高清創建

@story = current_user.stories.create(
     :name => params[:stories][:name] || 'New Story', 
     :description => params[:stories][:description] || '' 
    ) 

    # Add a blank page 
    @story.story_pages.create(
     :title => 'New Page', 
     :page_num => 1, 
     :story_version => @story.version 
    ) 
    @story.save 

    respond_with(@story) do |format| 
     format.html 
     format.json 
    end 
    end 

錯誤輸出包含:

> DEPRECATION WARNING: The InstanceMethods module inside 
> ActiveSupport::Concern will be no longer included automatically. 
> Please define instance methods directly in VestalVersions::Changes 
> instead. (called from include at 
> /Users/leo_odonnell/.bundler/ruby/1.9.1/vestal_versions-6273df533f85/lib/vestal_versions.rb:109) 
>  # and more like that, then 
>  NoMethodError (undefined method `class_inheritable_accessor' for #<Class:0x007fa59e5c9400>): 
>  app/models/story_page.rb:2:in `<class:StoryPage>' 
>  app/models/story_page.rb:1:in `<top (required)>' 
>  app/controllers/stories_controller.rb:22:in `create' 

回答

相關問題