在将Rails应用程序升级到Rails 5之后,运行RSpec测试会给出以下错误:
rails aborted!
ActiveRecord::NoEnvironmentInSchemaError:
Environment data not found in the schema. To resolve this issue, run:
bin/rails db:environment:set RAILS_ENV=test
但是,bin并不存在,我似乎无法用bundle binstubs rails或rake rails:update:bin生成它。
我也尝试过:
rails d
我正在尝试将rails从2.3升级到3.1。我引用了rails cast的升级视频,但我遇到了一些困难。
Steps i have followed till now.
1. Create a separate rails-3 branch from stable branch.
2. Update & reload rvm to the latest version.
3. gem install rails -v 3.0.20
4. rails upgrade check and rails upgrade backup using rails upgrade plugin
5.
或者类似的东西。我已经将几个应用程序从Rails 3.0升级到了Rails 3.1。它们在Thin上运行,并启用了多线程选项,它们都配置了threadsafe!。在Rails 3.0中工作得很好。但在3.1版本中,在几次请求之后,事情开始变慢。在更多的请求之后,页面挂起了N秒(其中N是我的数据库超时),我得到了这个错误:
ActiveRecord::ConnectionTimeoutError (could not obtain a database connection within 5 seconds. The max pool size is currently 5; consider
我有一个旧的2.1.1 Ruby on Rails应用程序,系统升级到使用Ruby 1.8.7。它最初使用的是1.8.5左右。
出于性能原因,我想将其升级到Ruby 1.9.x,也可能升级到更新的Ruby on Rails。
我找不到不同Ruby版本和Ruby on Rails版本之间的简单兼容性图表。
2.1.1可以和Ruby 1.9.x一起工作吗?如果没有,我需要先升级到什么程度,以及我可能会遇到什么样的问题?我的应用程序对数据库层做了一些复杂的事情,但其余的都相当简单。
当我将我的rails 5升级到rails 6,并且我们在应用程序中使用活动存储时。对于活动存储,它在Rails6中添加了一个新的迁移。 PG::ForeignKeyViolation: ERROR: insert or update on table "active_storage_attachments" violates foreign key constraint "fk_rails_c3b3935057"
DETAIL: Key (blob_id)=(256) is not present in table "active_storage_
我们使用的是subdomain_routes (0.3.1),现在从rails 2.3.8升级到rails 2.3.14时,我们看到了这个不推荐使用的警告:
DEPRECATION WARNING: Kernel#returning has been deprecated in favor of Object#tap. (called from significant_keys_with_subdomains at /home/mei/.rvm/gems/ruby-1.9.2-p0@rails2314/gems/subdomain_routes-0.3.1/lib/subdomain_rout
我最近升级到OSX小牛10.9从10.7,从那时起,它给我带来了很多麻烦。我升级了Xcode,命令行工具,重新安装了homebrew和rvm,最后让rails开始工作(我花了5个小时让rmagick再次工作)。
然而,现在当我尝试从本地主机访问我的应用程序时,我会得到这个错误。
no implicit conversion of Array into String
下面是rails日志:
Started GET "/" for 127.0.0.1 at 2014-05-05 02:20:00 -0700
Processing by AccountsController#dash
我们最近将我们的Rails应用程序从4升级到5,我遇到了一个突破性的变化,没有表格的模型。在Rails 4中,我们使用了这个模式:
class Foo < ActiveRecord::Base
attr_accessor :bar
def self.columns() @columns ||= []; end
end
ActiveAdmin.register Foo do
def create
@page_title = "Foo"
super
end
end
但是,在升级rails 5之后,我得到了这个错误:
ERROR: rela
我最近将rails从4.0.4升级到4.2,它的依赖关系也是如此。我在puma服务器上运行我的应用程序,我还将puma gem升级到了最新的稳定版本。
问题是,在升级之后,我的大多数请求时间从1-2秒变成了30+,导致Heroku超时
Puma连接文件
# Force heroku to bigger conenction pool
Rails.application.config.after_initialize do
ActiveRecord::Base.connection_pool.disconnect!
ActiveSupport.on_load(:active_recor
我将我的一个应用程序更新到了Rails5,并将Ruby版本也升级到了2.3.1。在Rails 5升级之前,该应用程序也已经使用了Puma,并部署在数字海洋水滴上。
当我在本地启动rails server时,我在我的Rails日志中得到了正常的输出,我已经将其复制到下面。
=> Booting Puma
=> Rails 5.0.0 application starting in development on http://localhost:3000
=> Run `rails server -h` for more startup options
[14669] Puma