43得票1回答
Rails 6.1中的`add_template_helper`方法似乎无法正常工作。

将我的项目更新到Rails 6.1后,我遇到了这个错误:NoMethodError: undefined method `add_template_helper' for ApplicationMailer:Class 这份文档中似乎没有被弃用的记录。

27得票6回答
Rails:如何删除一个挂起的迁移

我目前正在按照ruby on rails教程进行学习:http://guides.rubyonrails.org/getting_started.html。 我试图将数据保存到数据库中。但是,当我运行rails server时,我会得到以下错误:Migrations are pending....

25得票5回答
更新到 Ruby 3 和 Rails 6.1 后出现了未定义的方法`file_fixture_path`。

升级到 Ruby 3 和 Rails 6.1 后,我的测试在这一行崩溃:subject.avatar.attach(fixture_file_upload(Rails.root.join('spec', 'fixtures', 'images', 'avatar.jpg'))) 使用:NoMe...

20得票1回答
Rails 6.1.4 弃用警告:使用 '.' 渲染动作

在运行rails test时,我收到了一个弃用警告。 警告如下。 如果您能帮助我确定我的错误之处,将不胜感激。 (编辑:顺便说一句,渲染必须中断并从当前控制器调用返回。 我尝试使用ApplicationController.render(...)代替当前的render调用,但没有从控制器调用返...

14得票1回答
控制器出现NoMethodError错误,提示undefined method 'action_encoding_template'。

我在我的一个Rails控制器的#create操作中遇到了奇怪的错误: NoMethodError undefined method `action_encoding_template' for Controller 目前还没有明确的调试方法。

14得票2回答
警告:在Ruby 2.7.2中使用Paperclip时,URI.escape已经过时。

ruby - 2.7.2 rails - 6.0 paperclip - 6.1.0 当我在使用 Ruby 2.7.2 和 paperclip gem 时,我的控制台会出现以下警告: /Users/***/.rvm/gems/ruby-2.7.2/gems/papercl...

10得票2回答
Ruby 3.0.4与Postgres 14组合使用时会出现分段错误。

我有 Ruby 3.0.4 Rails 6.1.7 pg 1.4.5 postgresql 14.6 这是我的database.yml文件 development: adapter: postgresql encoding: utf8 database: olio_developmen...

8得票3回答
Rails 6.1.5:未初始化常量Mail :: TestMailer

在使用 "Rails 6.1.5 & Ruby 3.0.1" 没有问题的情况下,为什么在使用 "Rails 6.1.5 & Ruby 3.1.0" 时会出现“未初始化常量 Mail::TestMailer”错误?