epmclaughlin-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2007-Dec-10 14:57 UTC
could not find activerecord-sqlserver-adapter locally or in a repository
I''m trying to connect to a SQL Server db. I thought I installed the DBI component per the instructions, but its not working. When trying to start the ruby server, I get the message: Please install the sqlserver adapter: `gem install activerecord- sqlserver-adapter` But when I try to install the repository, I get this error message: could not find activerecord-sqlserver-adapter locally or in a repository Anyone? --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Redbeard
2007-Dec-13 17:38 UTC
Re: could not find activerecord-sqlserver-adapter locally or in a repository
Hey, I just ran into the exact same problem yesterday. I have been playing with RoR 1.x with a local version of MSSQL Server 2005 for a few months now but after I upgraded to RoR 2.0 this week, I received the same error message you did. This worked fine for me today. There have been a few other issues I''ve been getting but at least this ones done. navigate to http://svn.rubyonrails.org/rails/adapters/sqlserver/lib/active_record/connection_adapters/ and save save sqlserver_adapter.rb to <rails_app_home>\lib\ruby\gems\1.8\gems\activerecord-2.0.1\lib \active_record \connection_adapters as long as you have the ado.rb from ruby-dbi in your <rails_app_home> \lib\ ruby\site_ruby\1.8\DBD\ADO folder, you should be good to go. On Dec 10, 6:57 am, "epmclaugh...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org" <epmclaugh...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I''m trying to connect to a SQL Server db. I thought I installed the > DBI component per the instructions, but itsnotworking. > > When trying to start the ruby server, I get the message: > > Please install the sqlserver adapter: `gem installactiverecord-sqlserver-adapter` > > But when I try to install therepository, I get this error message: > > couldnotfindactiverecord-sqlserver-adapterlocallyor in arepository > > Anyone?--~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Dejan Dimic
2007-Dec-26 14:47 UTC
Re: could not find activerecord-sqlserver-adapter locally or in a repository
Use gem install activerecord-sqlserver-adapter --source=http:// gems.rubyonrails.org On Dec 13, 6:38 pm, Redbeard <rauosk...-H+0wwilmMs3R7s880joybQ@public.gmane.org> wrote:> Hey, > > I just ran into the exact same problem yesterday. I have been playing > with RoR 1.x with a local version of MSSQL Server 2005 for a few > months now but after I upgraded to RoR 2.0 this week, I received the > same error message you did. This worked fine for me today. There have > been a few other issues I''ve been getting but at least this ones done. > > navigate to > http://svn.rubyonrails.org/rails/adapters/sqlserver/lib/active_record... > > and save save sqlserver_adapter.rb to > > <rails_app_home>\lib\ruby\gems\1.8\gems\activerecord-2.0.1\lib > \active_record > \connection_adapters > > as long as you have the ado.rb from ruby-dbi in your <rails_app_home> > \lib\ ruby\site_ruby\1.8\DBD\ADO folder, you should be good to go. > > On Dec 10, 6:57 am, "epmclaugh...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org" <epmclaugh...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > wrote:> I''m trying to connect to a SQL Server db. I thought I installed the > > DBI component per the instructions, but itsnotworking. > > > When trying to start the ruby server, I get the message: > > > Please install the sqlserver adapter: `gem installactiverecord-sqlserver-adapter` > > > But when I try to install therepository, I get this error message: > > > couldnotfindactiverecord-sqlserver-adapterlocallyor in arepository > > > Anyone?--~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Milan Jaric
2008-Mar-31 07:58 UTC
Re: could not find activerecord-sqlserver-adapter locally or
Dejan Dimic wrote:> Use > > gem install activerecord-sqlserver-adapter --source=http:// > gems.rubyonrails.orghttp://gems.rubyonrails.org Forbidden any sugestions? -- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Stephen Anderson
2009-May-23 21:03 UTC
Re: could not find activerecord-sqlserver-adapter locally or
Milan Jaric wrote:> Dejan Dimic wrote: >> Use >> >> gem install activerecord-sqlserver-adapter --source=http:// >> gems.rubyonrails.org > > http://gems.rubyonrails.org > > Forbidden > > any sugestions?It appears that browser connections are forbidden. The gem install command works fine. -- Posted via http://www.ruby-forum.com/.
Andrew Boyd
2010-Nov-09 22:55 UTC
Re: could not find activerecord-sqlserver-adapter locally or
Stephen Anderson wrote in post #819208:> Milan Jaric wrote: >> Dejan Dimic wrote: >>> Use >>> >>> gem install activerecord-sqlserver-adapter --source=http:// >>> gems.rubyonrails.org >> >> http://gems.rubyonrails.org >> >> Forbidden >> >> any sugestions? > > It appears that browser connections are forbidden. The gem install > command works fine.It didn''t work for me: C:\Ruby187>gem install activerecord-sqlserver-adapter --source=http://gems.rubyonrails.org ERROR: Could not find a valid gem ''activerecord-sqlserver-adapter'' (>= 0) in any repository Not that I''m a MS fan or anything but I''m new to Ruby and I would think that finding an MS adapter should be relativity easy. Any help would be greatly appreciated. -- 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.
> It didn''t work for me: > C:\Ruby187>gem install activerecord-sqlserver-adapter > --source=http://gems.rubyonrails.org > ERROR: Could not find a valid gem ''activerecord-sqlserver-adapter'' (>> 0) in any repositoryHave you tried simply: gem install activerecord-sqlserver-adapter I am using MSSQL all the time and that is working for me. -- 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.
Andrew Boyd
2010-Nov-10 14:08 UTC
Re: could not find activerecord-sqlserver-adapter locally or
pepe wrote in post #960517:>> It didn''t work for me: >> C:\Ruby187>gem install activerecord-sqlserver-adapter >> --source=http://gems.rubyonrails.org >> ERROR: Could not find a valid gem ''activerecord-sqlserver-adapter'' (>>> 0) in any repository > > Have you tried simply: > gem install activerecord-sqlserver-adapter > > I am using MSSQL all the time and that is working for me.Thanks pepe. I had gone to RubyGems.org and it instructed me to do the same thing you advised and it works! Since you use MSSQL all the time perhaps you could answer my next hurdle. How do I convert my connection into a dsn? My connection string is: jdbc:jtds:sqlserver://rogue:1433/AALite; My ruby client is on windows so I think I need a dsn. Each time I try to set up a dsn I get the error: SQLState 42000 SQL Server Error: 4064 Any idea what I''m doing wrong? Thanks again for the 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
> Since you use MSSQL all the time perhaps you could answer my next > hurdle. How do I convert my connection into a dsn? My connection > string is: > jdbc:jtds:sqlserver://rogue:1433/AALite;Hi there, This is a list I use when setting up a new MSSQL based application. You might need to skip/change some of the steps. I hope it helps: 1. Install Ruby (1.8.6): http://www.ruby-lang.org/en/downloads/ 2. Install rubygems: a. http://rubygems.org/pages/download (zip version) b. Unpack to a directory and cd there c. ruby setup.rb 3. Install rails: gem install rails –v=2.3.5 4. Install mongrel: gem install mongrel 5. Install mongrel service: gem install mongrel_service 6. Install SQL Server adapter: gem install activerecord-sqlserver- adapter 7. Install ODBC gem: gem install odbc-rails 9. Install SQL Server Management utility (from Microsoft) 10. Create SQL Server DB (name <your_name_here>) 11. Create login in SQL Server (<your_name_here> For simplicity I use the same name as DB) 12. Create DB user (<your_name_here>) 13. Create DSN in Windows: a. Control Panel -> Adminstrative Tasks -> Data Sources (ODBC) b. Click on System DSN -> Add c. Select type SQL Server i. Name: <your_name_here> For simplicity I use the same name as the DB ii. Description: <your_description_here> iii. Server: Server name (<value_from_SQL_Server_Management> Something like XXXXXXXXXX\SQLEXPRESS) iv. Use SQL Authentication Then in your database.yml something like this: development: adapter: sqlserver mode: odbc dsn: <your_dsn_name_here> username: <your_db_user_here> password: <your_db_password_here> # host: not required when DSN is used I read in a post a few days ago that if you use DSN you don''t even need username and password. I have not tried that so I can''t say for sure. Good luck. -- 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.