gpt4 book ai didi

ruby-on-rails - Rails:载波未初始化的恒定误差

转载 作者:行者123 更新时间:2023-12-03 11:45:22 27 4
gpt4 key购买 nike

我有Rails 3

载波0.5.4

//app/uploaders/fasta_uploader.rb

class FastaUploader < CarrierWave::Uploader::Base
storage :file
def store_dir
'public/data/01_fasta'
end
end

//移民
class AddFileUpToCvits < ActiveRecord::Migration
def self.up
add_column :cvits, :fasta, :string
end

def self.down
remove_column :cvits, :fasta
end
end

//app/models/cvit.rb
class Cvit < ActiveRecord::Base
attr_accessible :fasta
mount_uploader :fasta, FastaUploader
end

//形成
<%= form_for(@cvit, :html => {:multipart => true, :onsubmit => "return ray.ajax()" }) do |f| %>
...
...
<%= f.file_field :fasta %><br></br>
<div class="actions">
<%= f.submit "Submit"%>
</div>
<% end %>

我收到此错误:未初始化的常量Cvit::FastaUploader

有什么建议???

最佳答案

简单重置服务器即可解决问题-_-您生活并在学习。

关于ruby-on-rails - Rails:载波未初始化的恒定误差,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6601761/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com