ruby-on-rails - TinyTDS 是否支持 Ruby 2.0.0?

标签 ruby-on-rails ruby ruby-2.0 tiny-tds

我在尝试让 TinyTDS 在 Windows 7 上与 Ruby 2.0.0 一起工作时遇到了真正的麻烦。

当我运行 rails c(或 require tiny_tds 来自 irb)时,我得到以下信息:

D:/Ruby/Ruby200/lib/ruby/gems/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require': cannot load such file -- tiny_tds/tiny_tds (LoadError)
            from D:/Ruby/Ruby200/lib/ruby/gems/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `block in require'
            from D:/Ruby/Ruby200/lib/ruby/gems/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in `load_dependency'
            from D:/Ruby/Ruby200/lib/ruby/gems/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
            from D:/Ruby/Ruby200/lib/ruby/gems/2.0.0/gems/tiny_tds-0.5.1-x86-mingw32/lib/tiny_tds.rb:16:in `rescue in <top (required)>'
            from D:/Ruby/Ruby200/lib/ruby/gems/2.0.0/gems/tiny_tds-0.5.1-x86-mingw32/lib/tiny_tds.rb:12:in `<top (required)>'
            from D:/Ruby/Ruby200/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `require'
            from D:/Ruby/Ruby200/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `block (2 levels) in require'
            from D:/Ruby/Ruby200/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `each'
            from D:/Ruby/Ruby200/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `block in require'
            from D:/Ruby/Ruby200/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `each'
            from D:/Ruby/Ruby200/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `require'
            from D:/Ruby/Ruby200/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler.rb:132:in `require'
            from S:/code/user/app/ruby2_test/config/application.rb:7:in `<top (required)>'
            from D:/Ruby/Ruby200/lib/ruby/gems/2.0.0/gems/railties-3.2.13/lib/rails/commands.rb:39:in `require'
            from D:/Ruby/Ruby200/lib/ruby/gems/2.0.0/gems/railties-3.2.13/lib/rails/commands.rb:39:in `<top (required)>'
            from script/rails:6:in `require'
            from script/rails:6:in `<main>'

我已尝试安装最新版本的 gem:

gem install tiny_tds --pre

往里看:

D:\Ruby\Ruby200\lib\ruby\gems\2.0.0\gems\tiny_tds-0.6.0.rc1-x86-mingw32\lib\tiny_tds

我可以看到没有 2.0 目录,这让我相信版本 2.0 不受支持。但是,我在 TinyTDS github 或任何其他网站上看不到有关此问题的任何提及。

那么,我是不是遗漏了什么,或者 TinyTDS 目前不能与 Ruby 2.0 一起使用?

最佳答案

从评论中复制答案以便从“未回答”过滤器中删除此问题:

I believe this is an issue with OS that you are using as another individual had the same issue. As stated I believe this is a dependency issue with Windows. Please see the comment from MetaSkills - https://github.com/rails-sqlserver/tiny_tds/issues/110#issuecomment-15503928

~ 根据 David 回答

关于ruby-on-rails - TinyTDS 是否支持 Ruby 2.0.0?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16836397/

相关文章:

ruby-on-rails - 在嵌套数组中查找对象的位置

ruby-on-rails - 将参数从 as_json 传递到模型

python - 有没有可能为动态语言创建编译器而不失去他的动态特性?

ruby-on-rails - 为什么我在将我的应用程序推送到 Heroku 时收到错误 500 "We' 抱歉,但出了点问题?

jquery - Rails 参数解析,需要转义吗?

ruby-on-rails - 使用 capybara 和 rspec 测试销毁操作

mysql - ln :/usr/lib/libmysqlclient. 18.dylib:文件存在

ruby - 将 Ruby 2.1 编译为字节码

ruby-on-rails - youtube_it 在更新到 Ruby 2 后抛出 ArgumentError - 如何修复?

ruby - 无法使用 require 加载文件