Fredrik TiC Jansson
2010-Oct-22 13:35 UTC
Problems when connecting to Sql server 2008 odbc no such file to load error
Hello i am a relative noob to the web world and i am now atempting to move a rails app to a windows server and connect it to a SQL 2008 database in database.yml file adapter: sqlserver mode: odbc dsn: Driver={SQL Native Client};Server=localhost;Database=DMBackEndServer;username=DM;Pwd=DM; in gemfile gem ''activerecord-sqlserver-adapter'' i have also setup a system data source via microsoft odbc data source administrator tool but all i get no matter how hard i try is LoadError (no such file to load -- odbc): What am i missing here ?? Help would be much apprechiated -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
radhames brito
2010-Oct-22 15:44 UTC
Re: Problems when connecting to Sql server 2008 odbc no such file to load error
On Fri, Oct 22, 2010 at 9:35 AM, Fredrik TiC Jansson < fredrikjansson1982-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hello i am a relative noob to the web world and i am now atempting to > move a rails app to a windows server and connect it to a SQL 2008 > database > > in database.yml file > > adapter: sqlserver > mode: odbc > dsn: Driver={SQL Native > Client};Server=localhost;Database=DMBackEndServer;username=DM;Pwd=DM; > > in gemfile > gem ''activerecord-sqlserver-adapter'' > > i have also setup a system data source via microsoft odbc data source > administrator tool > > but all i get no matter how hard i try is > > LoadError (no such file to load -- odbc): > > > What am i missing here ?? > > Help would be much apprechiated > >if you are connecting to MS sql you should be using adapter: sqlserver mode: ado database: blahblah host: mode_blah -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
radhames brito
2010-Oct-22 15:46 UTC
Re: Problems when connecting to Sql server 2008 odbc no such file to load error
> if you are connecting to MS sql you should be using > > adapter: sqlserver > mode: ado > database: blahblah > host: mode_blah >forgot to add dsn : much_more_blah autocommit: true -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Fredrik TiC Jansson
2010-Oct-25 08:41 UTC
Re: Problems when connecting to Sql server 2008 odbc no such file to load error
Thanks will try that now and report back if it solved my problem On 22 Okt, 17:46, radhames brito <rbri...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > if you are connecting to MS sql you should be using > > > adapter: sqlserver > > mode: ado > > database: blahblah > > host: mode_blah > > forgot to add > > dsn : much_more_blah > autocommit: true-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Fredrik TiC Jansson
2010-Oct-25 09:22 UTC
Re: Problems when connecting to Sql server 2008 odbc no such file to load error
that only gives me syntax error mode:ado (ArgumentError) i get the same error on that line when trying mode:odbc On 22 Okt, 17:46, radhames brito <rbri...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > if you are connecting to MS sql you should be using > > > adapter: sqlserver > > mode: ado > > database: blahblah > > host: mode_blah > > forgot to add > > dsn : much_more_blah > autocommit: true-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Fredrik TiC Jansson
2010-Oct-25 11:43 UTC
Re: Problems when connecting to Sql server 2008 odbc no such file to load error
I found the problem i wrote mode:ado but i should be mode: ado the space inbetween is inportant. Anyway on to the next problem i now get the error unknown connection mode when i use ado Is ado included in the dbi gem or do i have to install some other gem ? On 25 Okt, 11:22, Fredrik TiC Jansson <fredrikjansson1...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> that only gives me syntax error mode:ado (ArgumentError) i get the > same error on that line when trying mode:odbc > > On 22 Okt, 17:46, radhames brito <rbri...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > if you are connecting to MS sql you should be using > > > > adapter: sqlserver > > > mode: ado > > > database: blahblah > > > host: mode_blah > > > forgot to add > > > dsn : much_more_blah > > autocommit: true-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Fredrik TiC Jansson
2010-Oct-25 13:23 UTC
Re: Problems when connecting to Sql server 2008 odbc no such file to load error
Ok it is still not working and i have gotten indikations from forum posts and blogs that i should use mode: adonet this bombs out with the message no such file to load -- System.Data On 25 Okt, 13:43, Fredrik TiC Jansson <fredrikjansson1...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I found the problem i wrote mode:ado but i should be mode: ado the > space inbetween is inportant. > Anyway on to the next problem i now get the error unknown connection > mode when i use ado > Is ado included in the dbi gem or do i have to install some other > gem ? > > On 25 Okt, 11:22, Fredrik TiC Jansson <fredrikjansson1...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > wrote: > > > that only gives me syntax error mode:ado (ArgumentError) i get the > > same error on that line when trying mode:odbc > > > On 22 Okt, 17:46, radhames brito <rbri...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > if you are connecting to MS sql you should be using > > > > > adapter: sqlserver > > > > mode: ado > > > > database: blahblah > > > > host: mode_blah > > > > forgot to add > > > > dsn : much_more_blah > > > autocommit: true-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
KlausG
2010-Oct-25 13:25 UTC
Re: Problems when connecting to Sql server 2008 odbc no such file to load error
> gem ''activerecord-sqlserver-adapter'' > > LoadError (no such file to load -- odbc): >When using the odbc connection mode for the adapter, you need the gem ruby-odbc to be installed. You will find more information to this gem on http://www.ch-werner.de/rubyodbc/ When you are running on a Linux System I would recommend using the new TinyTDS gem: http://github.com/rails-sqlserver/tiny_tds Use mode: adonet only when you are running on IronRuby !! -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Fredrik TiC Jansson
2010-Oct-25 13:36 UTC
Re: Problems when connecting to Sql server 2008 odbc no such file to load error
I have installed both gems via gem install ''gemname'' after which i have wrote gem ''gemname'' in my gem file and then run bundle install inside the project folder ''gemname'' = is replaced by the name of the gem So yes i have installed those gems i hav also tried this with ruby 1.9.2 and i am currently using 1.8.7 since this version seems to be more stable for win(?) On 25 Okt, 15:25, KlausG <KD.Gunderm...-Tb+aL2ufDGcjFa9OqdExcIQuADTiUCJX@public.gmane.org> wrote:> > gem ''activerecord-sqlserver-adapter'' > > > LoadError (no such file to load -- odbc): > > When using the odbc connection mode for the adapter, > you need the gem ruby-odbc to be installed. You will > find more information to this gem on > http://www.ch-werner.de/rubyodbc/ > > When you are running on a Linux System I would > recommend using the new TinyTDS gem: > http://github.com/rails-sqlserver/tiny_tds > > Use mode: adonet only when you are running on IronRuby !!-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Fredrik TiC Jansson
2010-Oct-25 14:03 UTC
Re: Problems when connecting to Sql server 2008 odbc no such file to load error
I am getting a lot of indications that i should manually copy a file called ADO.rb to my .../ruby187/lib/ruby/gems/1.8/gems/dbi-0.4.5/lib/ dbi folder where do i download this file ? every link to it seems to point me to a dbi gem but not this file. also the error i am getting is still argument error unknown connection mode for mode => "ado" On 25 Okt, 15:36, Fredrik TiC Jansson <fredrikjansson1...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I have installed both gems via > gem install ''gemname'' > after which i have wrote > gem ''gemname'' in my gem file and then run bundle install inside the > project folder > > ''gemname'' = is replaced by the name of the gem > > So yes i have installed those gems i hav also tried this with ruby > 1.9.2 and i am currently using 1.8.7 since this version seems to be > more stable for win(?) > > On 25 Okt, 15:25, KlausG <KD.Gunderm...-Tb+aL2ufDGcjFa9OqdExcIQuADTiUCJX@public.gmane.org> wrote: > > > > gem ''activerecord-sqlserver-adapter'' > > > > LoadError (no such file to load -- odbc): > > > When using the odbc connection mode for the adapter, > > you need the gem ruby-odbc to be installed. You will > > find more information to this gem on > > http://www.ch-werner.de/rubyodbc/ > > > When you are running on a Linux System I would > > recommend using the new TinyTDS gem: > > http://github.com/rails-sqlserver/tiny_tds > > > Use mode: adonet only when you are running on IronRuby !!-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
radhames brito
2010-Oct-25 15:37 UTC
Re: Re: Problems when connecting to Sql server 2008 odbc no such file to load error
@Fredrik TiC Jansson What os are you running your dev on? -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Marnen Laibow-Koser
2010-Oct-25 15:42 UTC
Re: Problems when connecting to Sql server 2008 odbc no such file to load error
Radhames Brito wrote in post #956337:>> if you are connecting to MS sql you should be using >> >> adapter: sqlserver >> mode: ado >> database: blahblah >> host: mode_blah >> > > forgot to add > > dsn : much_more_blah > autocommit: trueOr rather, don''t use mode: ado. Use mode: odbc if you''re using ODBC, or (better yet) install tiny_tds, specify mode: dblib, and cut ODBC out of the equation entirely! Best, -- Marnen Laibow-Koser http://www.marnen.org marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Fredrik TiC Jansson
2010-Oct-26 09:00 UTC
Re: Problems when connecting to Sql server 2008 odbc no such file to load error
Windows server 2003 the app was originally developed on OSX snow leopard using just sqlite3 and i sucessluffy migrated it and got it running without a hitch on win server 2003 but i have to get it working with SQL sever 2008 for production purposes (sqlite3 just wont cut it) On 25 Okt, 17:37, radhames brito <rbri...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> @Fredrik TiC Jansson > > What os are you running your dev on?-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Fredrik TiC Jansson
2010-Oct-26 13:17 UTC
Re: Problems when connecting to Sql server 2008 odbc no such file to load error
Thinking this was just a windows problem was wrong ! i am apperently doing something really really wrong. i cant seem to get any gem besides rails to install properly ! installing mongrel works but installing dbd-odbc,dbi,activerecord-sqlserver-adatper and trying to use it always gives the no such file to load -- odcb error ! i have had som other errors which where solved by manually moving the files to the ruby appears to be looking for them but i am suspecting this is not the way to do it. On 26 Okt, 11:00, Fredrik TiC Jansson <fredrikjansson1...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Windows server 2003 > > the app was originally developed on OSX snow leopard using just > sqlite3 and i sucessluffy migrated it and got it running without a > hitch on win server 2003 > but i have to get it working with SQL sever 2008 for production > purposes (sqlite3 just wont cut it) > > On 25 Okt, 17:37, radhames brito <rbri...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > @Fredrik TiC Jansson > > > What os are you running your dev on?-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Fredrik TiC Jansson
2010-Oct-26 14:53 UTC
Re: Problems when connecting to Sql server 2008 odbc no such file to load error
After som experimenting i am totally and utterly lost. I run bundle install on my bundle and for example get using ruby-odbc i then when i start my rails server get require: no such file to load -- ruby-odbc why? On 26 Okt, 15:17, Fredrik TiC Jansson <fredrikjansson1...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Thinking this was just a windows problem was wrong ! i am apperently > doing something really really wrong. i cant seem to get any gem > besides rails to install properly ! > > installing mongrel works but installing > dbd-odbc,dbi,activerecord-sqlserver-adatper and trying to use it > always gives the no such file to load -- odcb error ! i have had som > other errors which where solved by manually moving the files to the > ruby appears to be looking for them but i am suspecting this is not > the way to do it. > > On 26 Okt, 11:00, Fredrik TiC Jansson <fredrikjansson1...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > wrote: > > > Windows server 2003 > > > the app was originally developed on OSX snow leopard using just > > sqlite3 and i sucessluffy migrated it and got it running without a > > hitch on win server 2003 > > but i have to get it working with SQL sever 2008 for production > > purposes (sqlite3 just wont cut it) > > > On 25 Okt, 17:37, radhames brito <rbri...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > @Fredrik TiC Jansson > > > > What os are you running your dev on?-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Marnen Laibow-Koser
2010-Oct-26 16:56 UTC
Re: Problems when connecting to Sql server 2008 odbc no such file to load error
Fredrik TiC Jansson wrote in post #957147:> Windows server 2003 > > the app was originally developed on OSX snow leopard using just > sqlite3 and i sucessluffy migrated it and got it running without a > hitch on win server 2003 > but i have to get it working with SQL sever 2008 for production > purposes (sqlite3 just wont cut it)You might like TinyTds. I''ve just changed an app over to it here at work, and I am really liking it. Also, if you have a choice, *do not* use a Windows server, and *do not* use MS SQL. I recommend *nix of some sort (I use Ubuntu) and PostgreSQL for ease and security of deployment. Best, -- Marnen Laibow-Koser http://www.marnen.org marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Fredrik TiC Jansson
2010-Oct-27 11:09 UTC
Re: Problems when connecting to Sql server 2008 odbc no such file to load error
i succeded in getting it working and posted a short how-to in this thread http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/90bac21d2f5d2616/908fbcaed47c5259#908fbcaed47c5259 will probably go the CentOS PhuzionPassenger MySql route in the future. On 26 Okt, 18:56, Marnen Laibow-Koser <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> Fredrik TiC Jansson wrote in post #957147: > > > Windows server 2003 > > > the app was originally developed on OSX snow leopard using just > > sqlite3 and i sucessluffy migrated it and got it running without a > > hitch on win server 2003 > > but i have to get it working with SQL sever 2008 for production > > purposes (sqlite3 just wont cut it) > > You might like TinyTds. I''ve just changed an app over to it here at > work, and I am really liking it. > > Also, if you have a choice, *do not* use a Windows server, and *do not* > use MS SQL. I recommend *nix of some sort (I use Ubuntu) and PostgreSQL > for ease and security of deployment. > > Best, > -- > Marnen Laibow-Koserhttp://www.marnen.org > mar...-sbuyVjPbboAdnm+yROfE0A@public.gmane.org > > -- > Posted viahttp://www.ruby-forum.com/.-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.