[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

ActiveRecord / SQL Server / ADO

Jayson Bailey

10/26/2007 8:00:00 PM

I'm trying to use ActiveRecord with SQL Server and ADO in a regular ruby
script, but can't get it working. I've seen a bunch of examples but
can't get them to work.

Here's what I've got:

require 'rubygems'
require 'active_record'



class TestMO < ActiveRecord::Base

ActiveRecord::Base.establish_connection(
:adapter => "sqlserver",
:mode => "ado",
:database => "mydb",
:username => "user",
:password => "pass"
)

set_table_name "test_mo"
end

I've got the ADO.rb in the right place I believe.

Here's the error I'm getting:

custom_require.rb:27:in `gem_original_require': no such file to load
--
Posted via http://www.ruby-....

34 Answers

jamecook@gmail.com

10/27/2007 3:54:00 AM

0

On Oct 26, 2:59 pm, Jayson Bailey <avoid...@yahoo.com> wrote:
> I'm trying to use ActiveRecord with SQL Server and ADO in a regular ruby
> script, but can't get it working. I've seen a bunch of examples but
> can't get them to work.
>
> Here's what I've got:
>
> require 'rubygems'
> require 'active_record'
>
> class TestMO < ActiveRecord::Base
>
> ActiveRecord::Base.establish_connection(
> :adapter => "sqlserver",
> :mode => "ado",
> :database => "mydb",
> :username => "user",
> :password => "pass"
> )
>
> set_table_name "test_mo"
> end
>
> I've got the ADO.rb in the right place I believe.
>
> Here's the error I'm getting:
>
> custom_require.rb:27:in `gem_original_require': no such file to load
> --
> Posted viahttp://www.ruby-....

I believe you need to use 'gem' or 'require_gem' for active_record.

jamecook@gmail.com

10/27/2007 4:07:00 AM

0

On Oct 26, 2:59 pm, Jayson Bailey <avoid...@yahoo.com> wrote:
> I'm trying to use ActiveRecord with SQL Server and ADO in a regular ruby
> script, but can't get it working. I've seen a bunch of examples but
> can't get them to work.
>
> Here's what I've got:
>
> require 'rubygems'
> require 'active_record'
>
> class TestMO < ActiveRecord::Base
>
> ActiveRecord::Base.establish_connection(
> :adapter => "sqlserver",
> :mode => "ado",
> :database => "mydb",
> :username => "user",
> :password => "pass"
> )
>
> set_table_name "test_mo"
> end
>
> I've got the ADO.rb in the right place I believe.
>
> Here's the error I'm getting:
>
> custom_require.rb:27:in `gem_original_require': no such file to load
> --
> Posted viahttp://www.ruby-....

I believe you need to use 'gem' or 'require_gem' for active_record.

Stefan Mahlitz

10/27/2007 9:34:00 AM

0

jamecook@gmail.com wrote:
> I believe you need to use 'gem' or 'require_gem' for active_record.

No, gem only sets the version of a later required gem and require_gem is
deprecated.

irb(main):001:0> require "rubygems"
=> true
irb(main):002:0> require "active_record"
=> true


Stefan Mahlitz

10/27/2007 9:35:00 AM

0

Jayson Bailey wrote:
> I'm trying to use ActiveRecord with SQL Server and ADO in a regular ruby
> script, but can't get it working. I've seen a bunch of examples but
> can't get them to work.
>
> Here's what I've got:
>
> require 'rubygems'
> require 'active_record'

> Here's the error I'm getting:
>
> custom_require.rb:27:in `gem_original_require': no such file to load

Is this the exact line?

I got

irb(main):003:0> require "some"
MissingSourceFile: no such file to load -- some
from
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require'

Which version of rubygems are you using?

cloud dreamer

7/29/2013 10:33:00 AM

0

On 29/07/2013 12:37 AM, Ed Stasiak wrote:
>> Barb May
>>> Ed Stasiak
>>>
>>> Yes, let's stop, because it's not my fault that Blacks commit crimes
>>
>> Actually it is your fault because you support the mass incarceration of
>> blacks and other minorities. But of course you won't admit you've had
>> a part in it.
>
> No, I don't have anything to do with it. I've stated in the past that
> I believe ALL drugs should be legalized / decriminalized.
>


Bath salts? Ecstasy?

You're insane.

..

cloud dreamer

7/29/2013 11:24:00 AM

0

On 29/07/2013 9:41 AM, trotsky wrote:
> On 7/29/13 6:33 AM, cloud dreamer wrote:
>> On 29/07/2013 12:37 AM, Ed Stasiak wrote:
>>>> Barb May
>>>>> Ed Stasiak
>>>>>
>>>>> Yes, let's stop, because it's not my fault that Blacks commit crimes
>>>>
>>>> Actually it is your fault because you support the mass incarceration of
>>>> blacks and other minorities. But of course you won't admit you've had
>>>> a part in it.
>>>
>>> No, I don't have anything to do with it. I've stated in the past that
>>> I believe ALL drugs should be legalized / decriminalized.
>>>
>>
>>
>> Bath salts? Ecstasy?
>>
>> You're insane.
>
>
> He's not insane--drugs have destroyed his brain which is what allowed
> him to make the statement.
>
>

Yeah....one too many ecstasy has burned holes in his brain. Oh
wait...one only needs to take one ecstasy to cause permanent brain damage.

Yup...great drug to legalize.


..

trotsky

7/29/2013 12:11:00 PM

0

On 7/29/13 6:33 AM, cloud dreamer wrote:
> On 29/07/2013 12:37 AM, Ed Stasiak wrote:
>>> Barb May
>>>> Ed Stasiak
>>>>
>>>> Yes, let's stop, because it's not my fault that Blacks commit crimes
>>>
>>> Actually it is your fault because you support the mass incarceration of
>>> blacks and other minorities. But of course you won't admit you've had
>>> a part in it.
>>
>> No, I don't have anything to do with it. I've stated in the past that
>> I believe ALL drugs should be legalized / decriminalized.
>>
>
>
> Bath salts? Ecstasy?
>
> You're insane.


He's not insane--drugs have destroyed his brain which is what allowed
him to make the statement.


--
Never post something on the internet unless you have a point of
reference. You will look like a moron otherwise.

Ed Stasiak

7/29/2013 12:58:00 PM

0

> cloud dreamer
> > Ed Stasiak
> >
> > I've stated in the past that I believe ALL drugs should be legalized /
decriminalized.
>
> Bath salts? Ecstasy?
> You're insane.

Not at all, it's the War on Drugs that is insane and that serves only to
further empower
and enrich the Global Corporate Elite, who pull the strings of the
politicians enforcing
these laws.

Presumably you don't do drugs, not because they're illegal but because
you've decided
that the risks outweigh the benefits and if drugs were legalized tomorrow,
you wouldn't
suddenly run out and start smoking crack, would you?

Yet despite bazillions of tax dollars pissed away over generations for the
War on Drugs,
EVERYBODY knows somebody who could get them drugs if they really wanted
them and
millions of Americans do get those drugs.

There is nothing stopping you from doing drugs now.

The War on Drugs has become nothing more than a corporate welfare scheme,
both on
the Black side (laundered drug profits making it's way into the economy)
and on the
White side, with tax dollars being spent on cops, courts, prisons; tires
for police cars,
computers for the courts, food for prisons, etc.

Anim8rFSK

7/29/2013 1:23:00 PM

0

In article <5g5icaxpe6.ln2@news.ezprovider.com>,
"Ed Stasiak" <a57160b@webnntp.invalid> wrote:

> > cloud dreamer
> > > Ed Stasiak
> > >
> > > I've stated in the past that I believe ALL drugs should be legalized /
> decriminalized.
> >
> > Bath salts? Ecstasy?
> > You're insane.
>
> Not at all, it's the War on Drugs that is insane and that serves only to
> further empower
> and enrich the Global Corporate Elite, who pull the strings of the
> politicians enforcing
> these laws.
>
> Presumably you don't do drugs

I just wanted to see that again.

--
Wait - are you saying that ClodReamer was wrong, or lying?

cloud dreamer

7/29/2013 1:59:00 PM

0

On 29/07/2013 10:28 AM, Ed Stasiak wrote:
>> cloud dreamer
>>> Ed Stasiak
>>>
>>> I've stated in the past that I believe ALL drugs should be legalized /
> decriminalized.
>>
>> Bath salts? Ecstasy?
>> You're insane.
>
> Not at all, it's the War on Drugs that is insane and that serves only to
> further empower
> and enrich the Global Corporate Elite,



See. You miss the point entirely.

..