简体   繁体   English

如何使用Firebird与Rails 4.2

[英]How to use Firebird with Rails 4.2

I am trying to update my rails application from version 4.1.6 to 4.2.0. 我正在尝试将我的rails应用程序从4.1.6更新到4.2.0。 Almost all are going well, except that I have two database connections (one is the default Postgres and other is used for reading data from another legacy application). 除了我有两个数据库连接(一个是默认的Postgres,另一个用于从另一个遗留应用程序读取数据)之外,几乎一切都进展顺利。 The second uses Firebird (fb) adapter. 第二个使用Firebird(fb)适配器。 In Rails 4.2 I cannot do anything with this second (fb) database. 在Rails 4.2中,我无法对第二个(fb)数据库做任何事情。 All commands result in this error: 所有命令都会导致此错误:

NoMethodError: undefined method `compile' for # NoMethodError:未定义的方法`compile'for#

To reproduce the case, I created a new application from scratch using adapter 'fb' and a simple model called Foo with two string columns. 为了重现这种情况,我使用适配器'fb'和一个名为Foo的简单模型从头创建了一个新的应用程序,其中包含两个字符串列。 After I called from rails console the command Foo.count the result is the same. 从rails控制台调用命令Foo.count ,结果是一样的。

Here is the full call stack for the problem 这是问题的完整调用堆栈

I tried to investigate the sources but I could not determine where is the problem. 我试图调查来源,但我无法确定问题出在哪里。 I think it has due to some changes/optimizations in activerecord in version 4.2 but I don't know exactly. 我认为它是由于版本4.2中的activerecord中的一些更改/优化,但我不确切知道。

Thanks in advance by any help. 在任何帮助下提前感谢。

根据这个封闭的问题 ,Gem activerecord-fb-adapter版本1.0.1现在支持rails ~>4.2

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM