忍者ブログ
[448]  [447]  [445]  [444]  [441]  [438]  [437]  [436]  [435]  [434]  [433
×

[PR]上記の広告は3ヶ月以上新規記事投稿のないブログに表示されています。新しい記事を書く事で広告が消えます。

RubyOnRailsでSQlserver接続の為に tiny_tdsをgemするとrails sでサーバー起動時に
LoadErrorでtiny_tds/tiny_tdsがないと叱られる


・環境
 windows10
   ruby  2.6.3p62  
   rails 5.2.3

・tiny_tds.rbは
 C:\Ruby26-x64\lib\ruby\gems\2.6.0\gems\tiny_tds-2.0.0-x64-mingw32\lib
 tiny_tds.rb内の26行目
   require 'tiny_tds/tiny_tds'をrequire 'tiny_tds'
 に変更

・rubyにtint-tdsを組み込み
 gem install -- platform ruby tiny_tds

・プロジェクトの作成
 ruby new -d sqlserver

・gemファイルの変更
gem 'tiny_tds' , '~> 2.0'
gem 'activerecord-sqlserver-adapter'
・bundle install (update)

環境はこれでOKのはず

拍手

PR
カレンダー
03 2025/04 05
S M T W T F S
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30
フリーエリア
最新CM
[03/10 DORA]
最新TB
プロフィール
HN:
dorabu
性別:
非公開
バーコード
ブログ内検索
P R
Copyright © ドラブーのアンドロイドとIoTなブログ All rights reserved. / Template by 四季. / Material by てんせん.

忍者ブログ [PR]