This has been a long painful day and I am hoping someone can help. I am trying to get my Rails application running on Mac/Leopard to connect to a Microsoft SQL server. I have followed the instructions at http://wiki.rubyonrails.org/rails/pages/HowtoConnectToMicrosoftSQLServerFromRailsOnOSX. Everything appears to work until I get to IRB. In other words, I can use iodbc and tsql with no problem. But when I go into IRB and run require ''dbi'', I get the following error: LoadError: no such file to load -- dbi from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:27:in `gem_original_require'' from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:27:in `require'' from (irb):1 from :0 According to MacPorts, I have installed rb-dbi @0.1.1_1+dbd_odbc (active) rb-odbc @0.9995_0 (active) What am I missing? Thanks! Tom --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
I have tried all those sites this week myself, the best solution was found at the following link: http://installingcats.com/2007/12/13/mysql-ruby-gem-install-problem-on-mac-os-x-leopard/ once this was finished, I was able to go into IRB and type require"MySql" and all worked fine. On Jul 22, 1:36 pm, TomRossi7 <t...-5bxIUPmzHicFraO2wh7vUA@public.gmane.org> wrote:> This has been a long painful day and I am hoping someone can help. I > am trying to get my Rails application running on Mac/Leopard to > connect to a Microsoft SQL server. I have followed the instructions > athttp://wiki.rubyonrails.org/rails/pages/HowtoConnectToMicrosoftSQLSer.... > > Everything appears to work until I get to IRB. In other words, I can > use iodbc and tsql with no problem. But when I go into IRB and run > require ''dbi'', I get the following error: > > LoadError: no such file to load -- dbi > from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:27:in > `gem_original_require'' > from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:27:in > `require'' > from (irb):1 > from :0 > > According to MacPorts, I have installed > rb-dbi @0.1.1_1+dbd_odbc (active) > rb-odbc @0.9995_0 (active) > > What am I missing? > > Thanks! > Tom--~--~---------~--~----~------------~-------~--~----~ 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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
This should help you: See http://www.napcsweb.com/blog/2007/03/08/15/ to see how I did it. (I try to keep this as up-to-date as I can.) On Tue, Jul 22, 2008 at 3:36 PM, TomRossi7 <tom-5bxIUPmzHicFraO2wh7vUA@public.gmane.org> wrote:> > This has been a long painful day and I am hoping someone can help. I > am trying to get my Rails application running on Mac/Leopard to > connect to a Microsoft SQL server. I have followed the instructions > at > > http://wiki.rubyonrails.org/rails/pages/HowtoConnectToMicrosoftSQLServerFromRailsOnOSX > . > > Everything appears to work until I get to IRB. In other words, I can > use iodbc and tsql with no problem. But when I go into IRB and run > require ''dbi'', I get the following error: > > LoadError: no such file to load -- dbi > from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:27:in > `gem_original_require'' > from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:27:in > `require'' > from (irb):1 > from :0 > > According to MacPorts, I have installed > rb-dbi @0.1.1_1+dbd_odbc (active) > rb-odbc @0.9995_0 (active) > > What am I missing? > > Thanks! > Tom > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
@hank: MySQL != Microsoft SQL Server. However, that link is very helpful for getting around the MySQL gem issues. On Tue, Jul 22, 2008 at 5:21 PM, hank <ihenryjackson-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > I have tried all those sites this week myself, the best solution was > found at the following link: > > http://installingcats.com/2007/12/13/mysql-ruby-gem-install-problem-on-mac-os-x-leopard/ > once this was finished, I was able to go into IRB and type > require"MySql" and all worked fine. > > > On Jul 22, 1:36 pm, TomRossi7 <t...-5bxIUPmzHicFraO2wh7vUA@public.gmane.org> wrote: > > This has been a long painful day and I am hoping someone can help. I > > am trying to get my Rails application running on Mac/Leopard to > > connect to a Microsoft SQL server. I have followed the instructions > > athttp:// > wiki.rubyonrails.org/rails/pages/HowtoConnectToMicrosoftSQLSer.... > > > > Everything appears to work until I get to IRB. In other words, I can > > use iodbc and tsql with no problem. But when I go into IRB and run > > require ''dbi'', I get the following error: > > > > LoadError: no such file to load -- dbi > > from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:27:in > > `gem_original_require'' > > from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:27:in > > `require'' > > from (irb):1 > > from :0 > > > > According to MacPorts, I have installed > > rb-dbi @0.1.1_1+dbd_odbc (active) > > rb-odbc @0.9995_0 (active) > > > > What am I missing? > > > > Thanks! > > Tom > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Brian, Thanks for your post. I followed your tutorial and got the require ''dbi'' from IRB to work, but when I try to use a brand new rails application with a database.yml set up with the correct Microsoft SQL connection information, I get the following error: /Library/Ruby/Site/1.8/rubygems.rb:142:in `activate'':Gem::Exception: can''t activate activerecord (= 1.15.6, runtime), already activated activerecord-2.1.0 Anyone have any insight into this? Thanks, Tom On Jul 22, 6:33 pm, "Brian Hogan" <bpho...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> This should help you: > > Seehttp://www.napcsweb.com/blog/2007/03/08/15/to see how I did it. (I try > to keep this as up-to-date as I can.) > > On Tue, Jul 22, 2008 at 3:36 PM, TomRossi7 <t...-5bxIUPmzHicFraO2wh7vUA@public.gmane.org> wrote: > > > This has been a long painful day and I am hoping someone can help. I > > am trying to get my Rails application running on Mac/Leopard to > > connect to a Microsoft SQL server. I have followed the instructions > > at > > >http://wiki.rubyonrails.org/rails/pages/HowtoConnectToMicrosoftSQLSer... > > . > > > Everything appears to work until I get to IRB. In other words, I can > > use iodbc and tsql with no problem. But when I go into IRB and run > > require ''dbi'', I get the following error: > > > LoadError: no such file to load -- dbi > > from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:27:in > > `gem_original_require'' > > from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:27:in > > `require'' > > from (irb):1 > > from :0 > > > According to MacPorts, I have installed > > rb-dbi @0.1.1_1+dbd_odbc (active) > > rb-odbc @0.9995_0 (active) > > > What am I missing? > > > Thanks! > > Tom--~--~---------~--~----~------------~-------~--~----~ 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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
I know what it is, although I can''t tell you how to fix it. A gem is specifying that it needs activerecord version 1.15.6. At this point this requirement is discovered, Rails tries to activate that gem. However, your setup is already running activerecord version 2.1.0. Rails can''t activate two versions of the same gem, hence the error. Generally, this happens when a newer version of a gem is installed. In this case, for example, I''d expect to see: /Library/Ruby/Site/1.8/rubygems.rb:142:in `activate'':Gem::Exception: can''t activate activerecord (= 2.1.0, runtime), already activated activerecord-1.15.6 In that case, the fix that has worked for me is gem cleanup, which removes older versions of duplicated gems. If you did that, I''m assuming that activerecord 1.15.6 would be removed. I''m not sure what that would do, since you clearly have a gem that is trying to activate 1.15.6 instead of the other way ''round. On Jul 23, 10:21 am, TomRossi7 <t...-5bxIUPmzHicFraO2wh7vUA@public.gmane.org> wrote:> Brian, > > Thanks for your post. I followed your tutorial and got the require > ''dbi'' from IRB to work, but when I try to use a brand new rails > application with a database.yml set up with the correct Microsoft SQL > connection information, I get the following error: > > /Library/Ruby/Site/1.8/rubygems.rb:142:in `activate'':Gem::Exception: > can''t activate activerecord (= 1.15.6, runtime), already activated > activerecord-2.1.0 > > Anyone have any insight into this? > > Thanks, > Tom > > On Jul 22, 6:33 pm, "Brian Hogan" <bpho...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > This should help you: > > > Seehttp://www.napcsweb.com/blog/2007/03/08/15/tosee how I did it. (I try > > to keep this as up-to-date as I can.) > > > On Tue, Jul 22, 2008 at 3:36 PM, TomRossi7 <t...-5bxIUPmzHicFraO2wh7vUA@public.gmane.org> wrote: > > > > This has been a long painful day and I am hoping someone can help. I > > > am trying to get my Rails application running on Mac/Leopard to > > > connect to a Microsoft SQL server. I have followed the instructions > > > at > > > >http://wiki.rubyonrails.org/rails/pages/HowtoConnectToMicrosoftSQLSer... > > > . > > > > Everything appears to work until I get to IRB. In other words, I can > > > use iodbc and tsql with no problem. But when I go into IRB and run > > > require ''dbi'', I get the following error: > > > > LoadError: no such file to load -- dbi > > > from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:27:in > > > `gem_original_require'' > > > from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:27:in > > > `require'' > > > from (irb):1 > > > from :0 > > > > According to MacPorts, I have installed > > > rb-dbi @0.1.1_1+dbd_odbc (active) > > > rb-odbc @0.9995_0 (active) > > > > What am I missing? > > > > Thanks! > > > Tom--~--~---------~--~----~------------~-------~--~----~ 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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Rails 2.x dropped native support for SQL Server. Add it back. sudo gem instal activerecord-sqlserver-adapter --sourcehttp://www.rubyonrails.org On Wed, Jul 23, 2008 at 11:43 AM, savant <bablaza-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > I know what it is, although I can''t tell you how to fix it. > > A gem is specifying that it needs activerecord version 1.15.6. At this > point this requirement is discovered, Rails tries to activate that > gem. However, your setup is already running activerecord version > 2.1.0. Rails can''t activate two versions of the same gem, hence the > error. > > Generally, this happens when a newer version of a gem is installed. In > this case, for example, I''d expect to see: > > /Library/Ruby/Site/1.8/rubygems.rb:142:in `activate'':Gem::Exception: > can''t activate activerecord (= 2.1.0, runtime), already activated > activerecord-1.15.6 > > In that case, the fix that has worked for me is gem cleanup, which > removes older versions of duplicated gems. If you did that, I''m > assuming that activerecord 1.15.6 would be removed. I''m not sure what > that would do, since you clearly have a gem that is trying to activate > 1.15.6 instead of the other way ''round. > > On Jul 23, 10:21 am, TomRossi7 <t...-5bxIUPmzHicFraO2wh7vUA@public.gmane.org> wrote: > > Brian, > > > > Thanks for your post. I followed your tutorial and got the require > > ''dbi'' from IRB to work, but when I try to use a brand new rails > > application with a database.yml set up with the correct Microsoft SQL > > connection information, I get the following error: > > > > /Library/Ruby/Site/1.8/rubygems.rb:142:in `activate'':Gem::Exception: > > can''t activate activerecord (= 1.15.6, runtime), already activated > > activerecord-2.1.0 > > > > Anyone have any insight into this? > > > > Thanks, > > Tom > > > > On Jul 22, 6:33 pm, "Brian Hogan" <bpho...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > This should help you: > > > > > Seehttp://www.napcsweb.com/blog/2007/03/08/15/tosee how I did it. (I > try > > > to keep this as up-to-date as I can.) > > > > > On Tue, Jul 22, 2008 at 3:36 PM, TomRossi7 <t...-5bxIUPmzHicFraO2wh7vUA@public.gmane.org> > wrote: > > > > > > This has been a long painful day and I am hoping someone can help. I > > > > am trying to get my Rails application running on Mac/Leopard to > > > > connect to a Microsoft SQL server. I have followed the instructions > > > > at > > > > > > > http://wiki.rubyonrails.org/rails/pages/HowtoConnectToMicrosoftSQLSer... > > > > . > > > > > > Everything appears to work until I get to IRB. In other words, I can > > > > use iodbc and tsql with no problem. But when I go into IRB and run > > > > require ''dbi'', I get the following error: > > > > > > LoadError: no such file to load -- dbi > > > > from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:27:in > > > > `gem_original_require'' > > > > from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:27:in > > > > `require'' > > > > from (irb):1 > > > > from :0 > > > > > > According to MacPorts, I have installed > > > > rb-dbi @0.1.1_1+dbd_odbc (active) > > > > rb-odbc @0.9995_0 (active) > > > > > > What am I missing? > > > > > > Thanks! > > > > Tom > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
> sudo gem instal activerecord-sqlserver-adapter --source> http://www.rubyonrails.orgsource needs to be: http://gems.rubyonrails.org in order to instal the activerecord-sqlserver-adapter. -- 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 -~----------~----~----~----~------~----~------~--~---