Hi all I want to connect my app to MSSQL but when i type rake db:migrate an erro occured like this: ←[31mCould not find gem ''odbc (>= 0, runtime)'' in any of the gem sources listed in your Gemfile.←[0m this is my YML file: development: adapter: sqlserver mode: odbc dsn: ontrack host: BABAK-PC pool: 5 timeout: 5000 and in my gem file gem ''activerecord-sqlserver-adapter'' gem ''odbc'' Thnk you for your help -- 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@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Sunday, May 22, 2011 11:51:23 AM UTC-6, Ruby-Forum.com User wrote:> > Hi all > > I want to connect my app to MSSQL but when i type > > rake db:migrate > > an erro occured like this: > > ←[31mCould not find gem ''odbc (>= 0, runtime)'' in any of the gem sources > listed in your Gemfile.←[0m >The error message is your answer. There is no "odbc" gem (at least, not hosted on any of the sources which I''m guessing is just the default of :rubygems for you). You can verify that rubygems.org doesn''t have a gem named "odbc" by visiting http://www.rubygems.org/ and doing a search for "odbc". You''ll get several resulting gems, but none of the gems are named (exactly) "odbc". The "Installation" section of the README.rdoc file from the activerecord-sqlserver-adapter gem (https://github.com/rails-sqlserver/activerecord-sqlserver-adapter) says that you need "Ruby ODBC". This would be the "ruby-odbc" gem (http://rubygems.org/gems/ruby-odbc ; try "ruby-odbc" in your Gemfile).> this is my YML file: > > development: > adapter: sqlserver > mode: odbc > dsn: ontrack > host: BABAK-PC > pool: 5 > timeout: 5000 > > and in my gem file > > gem ''activerecord-sqlserver-adapter'' > gem ''odbc'' > > Thnk you for your help > > -- > 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@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Kendall Gifford wrote in post #1000466:> On Sunday, May 22, 2011 11:51:23 AM UTC-6, Ruby-Forum.com User wrote: >> listed in your Gemfile.←[0m >> > The error message is your answer. There is no "odbc" gem (at least, not > hosted on any of the sources which I''m guessing is just the default of > :rubygems for you). You can verify that rubygems.org doesn''t have a gem > named "odbc" by visiting http://www.rubygems.org/ and doing a search for > "odbc". > > You''ll get several resulting gems, but none of the gems are named > (exactly) > "odbc". > > The "Installation" section of the README.rdoc file from the > activerecord-sqlserver-adapter gem > (https://github.com/rails-sqlserver/activerecord-sqlserver-adapter) says > that you need "Ruby ODBC". This would be the "ruby-odbc" gem > (http://rubygems.org/gems/ruby-odbc ; try "ruby-odbc" in your Gemfile).Thank you Kendll,i think my problem has been solved but i am facing another problem in connecting to my sql server. another error is: 28000 (18456) [Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user XXX/XXX what should i do?would you please help me? -- 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@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 24 May 2011 21:49, Babak bsn <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> Kendall Gifford wrote in post #1000466: >> On Sunday, May 22, 2011 11:51:23 AM UTC-6, Ruby-Forum.com User wrote: >>> listed in your Gemfile.←[0m >>> >> The error message is your answer. There is no "odbc" gem (at least, not >> hosted on any of the sources which I''m guessing is just the default of >> :rubygems for you). You can verify that rubygems.org doesn''t have a gem >> named "odbc" by visiting http://www.rubygems.org/ and doing a search for >> "odbc". >> >> You''ll get several resulting gems, but none of the gems are named >> (exactly) >> "odbc". >> >> The "Installation" section of the README.rdoc file from the >> activerecord-sqlserver-adapter gem >> (https://github.com/rails-sqlserver/activerecord-sqlserver-adapter) says >> that you need "Ruby ODBC". This would be the "ruby-odbc" gem >> (http://rubygems.org/gems/ruby-odbc ; try "ruby-odbc" in your Gemfile). > > Thank you Kendll,i think my problem has been solved but i am facing > another problem in connecting to my sql server. another error is: > > 28000 (18456) [Microsoft][ODBC SQL Server Driver][SQL Server]Login > failed for user XXX/XXX > > what should i do?would you please help me?Have you checked that user XXX/XXX can login to the server via an alternative client? It seems an obvious thing to check, but you have not told us that you have checked so the question has to be asked. Colin -- 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.
Colin Law wrote in post #1000728:> Have you checked that user XXX/XXX can login to the server via an > alternative client?What you means? Excuse me I am Beginner :( could you please give me an example? -- 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.
On Tue, May 24, 2011 at 4:12 PM, Babak bsn <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> Colin Law wrote in post #1000728: > > > Have you checked that user XXX/XXX can login to the server via an > > alternative client? > What you means? Excuse me I am Beginner :( could you please give me an > example? > >He means go use a tool that comes with SQL server or any other tool out there for connecting to databases and try to connect to you database. The error you got is pretty clear, you have the wrong user id and/or password. If you got this id and password from someone else (like a DBA) go back to that person and make sure they gave you a correct one. B. -- 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.
Bryan Crossland wrote in post #1000783:> On Tue, May 24, 2011 at 4:12 PM, Babak bsn <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote: > > He means go use a tool that comes with SQL server or any other tool out > there for connecting to databases and try to connect to you database. > The > error you got is pretty clear, you have the wrong user id and/or > password. > If you got this id and password from someone else (like a DBA) go back > to > that person and make sure they gave you a correct one. > > B.Thank you Bryan,now i understand , i checked my Connection string to SQL Server and there i did not need to connect via username and passwort but i dont know i need to enter Username and passwort -- 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.
On 25 May 2011 19:47, Babak bsn <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> Bryan Crossland wrote in post #1000783: >> On Tue, May 24, 2011 at 4:12 PM, Babak bsn <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote: >> >> He means go use a tool that comes with SQL server or any other tool out >> there for connecting to databases and try to connect to you database. >> The >> error you got is pretty clear, you have the wrong user id and/or >> password. >> If you got this id and password from someone else (like a DBA) go back >> to >> that person and make sure they gave you a correct one. >> >> B. > > Thank you Bryan,now i understand , i checked my Connection string to SQL > Server and there i did not need to connect via username and passwort but > i dont know i need to enter Username and passwortJust in case you did not realise, you should specify the user and password in config/database.yml Colin -- 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.
Colin Law wrote in post #1001026:> On 25 May 2011 19:47, Babak bsn <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> > Just in case you did not realise, you should specify the user and > password in config/database.yml > > ColinHi Colin Which username and password? i used Windows NT authentication to connect to SQL in my odbc -- 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.
On 25 May 2011 21:46, Babak bsn <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> Colin Law wrote in post #1001026: >> On 25 May 2011 19:47, Babak bsn <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote: > >> >> Just in case you did not realise, you should specify the user and >> password in config/database.yml >> >> Colin > > Hi Colin > > Which username and password? > i used Windows NT authentication to connect to SQL in my odbcNo idea, sorry, I think you will have to talk to your system admin guy or someone who knows about MSSQL server or perhaps ODBC. I don''t think It is a rails issue. Perhaps your NT user/password will work. Colin -- 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.
Hi Colin, try including: "integrated_security: true'' in the YML file. (and eliminate user and password) in the link: https://github.com/rails-sqlserver/activerecord-sqlserver-adapter In the IronRuby section, it is mentioning that issue. Regards, Eduardo Blumenfeld -- 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.
Eduardo Blumenfeld wrote in post #1001093:> Hi Colin, > > try including: > "integrated_security: true'' > in the YML file. (and eliminate user and password) > > in the link: > > https://github.com/rails-sqlserver/activerecord-sqlserver-adapter > > In the IronRuby section, it is mentioning that issue. > > Regards, > > Eduardo BlumenfeldHi Eduardo Yesssssssssss,That''s it.That problem has been solved :) Should i change Test and Protection block in my YML file?I''m facing another Error about these two blocks Thank you so much -- 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.