1

OK - どこでも検索したと思います。これは重複した質問であると思いますが、複数のことを調べて試した後でも基本的なvestal_versions (1.2.2) が機能していません。私は開発の初期段階にいるので、Rails 3.2 と Ruby 1.9.3 で実際に動作する他のバージョン管理ソリューションを受け入れます。

レポの所有者は別のチャンピオンを探しているので (多分それは私に何かを教えてくれるはずです)、TLC なしでは不可能かもしれませんが、誰かがそれを理解してくれたら幸いです。

御時間ありがとうございます!

これが私の状況です:

  • 最大 OS X 10.8.2
  • Mac ポート: ruby​​ 1.9.3p194 (2012-04-20 リビジョン 35410) [x86_64-darwin11]
  • レール 3.2.8

私のGemfileで

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

- git://github.com/laserlemon/vestal_versions.git からの vestal_versions (1.2.2) の使用 (マスターで)

私のモデル:

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'
4

1 に答える 1

0

試してください: バンドル更新レーキ

また、MassAssignmentSecurity::Error が発生している場合は、この修正を試してください: https://github.com/laserlemon/vestal_versions/issues/86

于 2013-05-13T21:33:13.493 に答える