PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > comp.lang.ruby > gem require 'activerecord' or 'active_record'
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
gem require 'activerecord' or 'active_record'

Réponse
 
LinkBack Outils de la discussion
Vieux 02/12/2007, 16h59   #1
jansenh
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut gem require 'activerecord' or 'active_record'

Hi comp.lang.ruby

I am doing my first thing with ActiveRecord (without Rails), and to
me out I have the 'Pro ActiveRecord' book from APress, which is a
fine resource, except from one annoying thing; all pieces of sample
code in the book uses the statement:

require 'activerecord'

which refuses to work on both my windows-ruby and ubuntu-ruby setups.
Searching this group I learned that using the statement:

require 'active_record'

solves that problem. What am I missing? What's the difference between
the two, and why is only one of them working on my code?


regards, henning
  Réponse avec citation
Vieux 02/12/2007, 20h35   #2
Kyle Schmitt
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: gem require 'activerecord' or 'active_record'

It may have something to do with the version of ruby installed, or how
activerecord was installed, or ruby was setup, etc etc.
I recall that older versions of ruby need you to require 'rubygems' to
access libraries installed with gem, where newer versions do not. It
could be some similar sort of switch in behavior....

--Kyle

On Dec 2, 2007 11:00 AM, jansenh <henning.jansen@gmail.com> wrote:
> Hi comp.lang.ruby
>
> I am doing my first thing with ActiveRecord (without Rails), and to
> me out I have the 'Pro ActiveRecord' book from APress, which is a
> fine resource, except from one annoying thing; all pieces of sample
> code in the book uses the statement:
>
> require 'activerecord'
>
> which refuses to work on both my windows-ruby and ubuntu-ruby setups.
> Searching this group I learned that using the statement:
>
> require 'active_record'
>
> solves that problem. What am I missing? What's the difference between
> the two, and why is only one of them working on my code?
>
>
> regards, henning
>
>


  Réponse avec citation
Vieux 02/12/2007, 22h58   #3
malugu satyajit
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: gem require 'activerecord' or 'active_record'

Note: parts of this message were removed by the gateway to make it a legal Usenet post.

Is it ok, to post Rails questions in this ruby list?

I have one question.

Can we have modules and mixins in rails framework? If so, what is the ideal
place to put it in the MVC framework.

Specifically I have one SuperClass and three sub classes, except some all
the functionality of the sub classes can be inherited from the super class.

I can give you much more details.

Satyajit

On Dec 2, 2007 3:35 PM, Kyle Schmitt <kyleaschmitt@gmail.com> wrote:

> It may have something to do with the version of ruby installed, or how
> activerecord was installed, or ruby was setup, etc etc.
> I recall that older versions of ruby need you to require 'rubygems' to
> access libraries installed with gem, where newer versions do not. It
> could be some similar sort of switch in behavior....
>
> --Kyle
>
> On Dec 2, 2007 11:00 AM, jansenh <henning.jansen@gmail.com> wrote:
> > Hi comp.lang.ruby
> >
> > I am doing my first thing with ActiveRecord (without Rails), and to
> > me out I have the 'Pro ActiveRecord' book from APress, which is a
> > fine resource, except from one annoying thing; all pieces of sample
> > code in the book uses the statement:
> >
> > require 'activerecord'
> >
> > which refuses to work on both my windows-ruby and ubuntu-ruby setups.
> > Searching this group I learned that using the statement:
> >
> > require 'active_record'
> >
> > solves that problem. What am I missing? What's the difference between
> > the two, and why is only one of them working on my code?
> >
> >
> > regards, henning
> >
> >

>
>



--
Regards,
M.Satyajit
Graduate Student,
Department of Computer Science,
NCSU.
www4.ncsu.edu/~smalugu

  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 11h54.


Édité par : vBulletin® version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,13334 seconds with 11 queries