Forum: Rails France Routes

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Bolo M. (Guest)
on 2006-04-01 21:17
(Received via mailing list)
Salut,

j'ai suivi ce tuto
http://www.illanti.com/files/locomotive101.mov

Apres avoir modifier la page route et supprimer la page index.html , je
lance

http://localhost:3000/

mais j'ai ce message
NameError in Notes#index

uninitialized constant Note
RAILS_ROOT:
/Users/bolomichelin/Documents/Creation_Perso/Developement/monApp/public/../config/..

Ca veut dire quoi ?

Bolo
Guillaume "Zifro" DESRAT (Guest)
on 2006-04-01 22:24
(Received via mailing list)
Je viens de regarder la vidéo, c'est "note", pas "Notes" le nom du
contrôleur.
Vérifie ta route.



Le 01/04/06, Bolo M. <removed_email_address@domain.invalid> a écrit :
>
> _______________________________________________
> Railsfrance mailing list
> removed_email_address@domain.invalid
> http://lists.rubyonrails.fr/mailman/listinfo/railsfrance
>



--
Guillaume "Zifro" DESRAT
http://.../
-- Aah Jeez...I Wish You Could See This....Lights Coming Up.....I've
Never
Seen A Painting That Captures The Beauty Of The Ocean.....I'm Gonna Make
You
Rich, Bud Fox....Rich Enough You Can Afford A Girl Like Darien....This
Is
Your Wake-Up Call, Pall....Go To Work.....DROP IT!!! (3 Steps Ahead -
Drop
It)
Bolo M. (Guest)
on 2006-04-02 00:36
(Received via mailing list)
Dans la vidéo il met bien "notes" et "note"

Bolo
2006/4/1, Guillaume Zifro DESRAT <removed_email_address@domain.invalid>:
Guillaume "Zifro" DESRAT (Guest)
on 2006-04-02 01:04
(Received via mailing list)
"notes" c'est le nom de la table et "note" c'est le nom du contrôleur et
aussi celui du modèle (singulier de "notes").

Peux-tu nous faire un copier/coller de tes routes pour qu'on puisse
t'aider
?

Le 01/04/06, Bolo M. <removed_email_address@domain.invalid> a écrit :
> >
> > http://localhost:3000/
> >
> > http://.../
> > Railsfrance mailing list
> > removed_email_address@domain.invalid
> > http://lists.rubyonrails.fr/mailman/listinfo/railsfrance
> >
> >
> >
> _______________________________________________
> Railsfrance mailing list
> removed_email_address@domain.invalid
> http://lists.rubyonrails.fr/mailman/listinfo/railsfrance
>



--
Guillaume "Zifro" DESRAT
http://.../
-- Aah Jeez...I Wish You Could See This....Lights Coming Up.....I've
Never
Seen A Painting That Captures The Beauty Of The Ocean.....I'm Gonna Make
You
Rich, Bud Fox....Rich Enough You Can Afford A Girl Like Darien....This
Is
Your Wake-Up Call, Pall....Go To Work.....DROP IT!!! (3 Steps Ahead -
Drop
It)
Bolo M. (Guest)
on 2006-04-02 01:13
(Received via mailing list)
> "notes" c'est le nom de la table et "note" c'est le nom du contrôleur et
> aussi celui du modèle (singulier de "notes").

Byzaremment je vois qu'il change welcome par 'notes' . Je suis pe
fatiguée>
>  Peux-tu nous faire un copier/coller de tes routes pour qu'on puisse t'aider
> ?

Bien sur

routes.db
ActionController::Routing::Routes.draw do |map|
  # Add your own custom routes here.
  # The priority is based upon order of creation: first created ->
highest priority.

  # Here's a sample route:
  # map.connect 'products/:id', :controller => 'catalog', :action =>
'view'
  # Keep in mind you can assign values other than :controller and
:action

  # You can have the root of your site routed by hooking up ''
  # -- just remember to delete public/index.html.
   map.connect '', :controller => 'notes'

  # Allow downloading Web Service WSDL as a file with an extension
  # instead of a file named 'wsdl'
  map.connect ':controller/service.wsdl', :action => 'wsdl'

  # Install the default route as the lowest priority.
  map.connect ':controller/:action/:id'
end

Bolo
Guillaume "Zifro" DESRAT (Guest)
on 2006-04-02 01:37
(Received via mailing list)
map.connect '', :controller => 'notes'

Le contrôleur s'appelle "note", donc il faut écrire map.connect '',
:controller => 'note'.
(ce que je dis depuis tout à l'heure...)

Fais le changement et tiens nous au courant.

2006/4/1, Bolo M. <removed_email_address@domain.invalid>:
> Bien sur
>   # Keep in mind you can assign values other than :controller and :action
>   map.connect ':controller/:action/:id'
> > > > Je viens de regarder la vidéo, c'est "note", pas "Notes" le nom du
> > > > http://www.illanti.com/files/locomotive101.mov
> > > > uninitialized constant Note
> > > > removed_email_address@domain.invalid
> > > > Seen A Painting That Captures The Beauty Of The Ocean.....I'm Gonna
> > > > Railsfrance mailing list
> > >
> > Rich, Bud Fox....Rich Enough You Can Afford A Girl Like Darien....This
> >
> _______________________________________________
> Railsfrance mailing list
> removed_email_address@domain.invalid
> http://lists.rubyonrails.fr/mailman/listinfo/railsfrance
>



--
Guillaume "Zifro" DESRAT
http://.../
-- Aah Jeez...I Wish You Could See This....Lights Coming Up.....I've
Never
Seen A Painting That Captures The Beauty Of The Ocean.....I'm Gonna Make
You
Rich, Bud Fox....Rich Enough You Can Afford A Girl Like Darien....This
Is
Your Wake-Up Call, Pall....Go To Work.....DROP IT!!! (3 Steps Ahead -
Drop
It)
Bolo M. (Guest)
on 2006-04-02 03:12
(Received via mailing list)
J'avais bien lu et fais la correction mais ca ne changais rien.

NameError in <controller not set>#<action not set>

uninitialized constant NoteController
RAILS_ROOT:
/Users/bolomichelin/Documents/Creation_Perso/Developement/monApp/public/../config/..

Application Trace | Framework Trace | Full Trace
/Applications/Locomotive/Bundles/rails-1.0.0-max.bundle/Contents/Resources/ports/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active_support/dependencies.rb:200:in
`const_missing'
/Applications/Locomotive/Bundles/rails-1.0.0-max.bundle/Contents/Resources/ports/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active_support/dependencies.rb:72:in
`const_missing'
generated/routing/recognition.rb:4:in `recognize_path'
This error occured while loading the following files:
   note_controller.rb

2006/4/1, Guillaume Zifro DESRAT <removed_email_address@domain.invalid>:
Bolo M. (Guest)
on 2006-04-03 19:28
(Received via mailing list)
Je fais une petit big Up sur mon message.
J'ai fais les corrections , j'ai un nouveau message d'erreur

2006/4/1, Bolo M. <removed_email_address@domain.invalid>:
Guillaume "Zifro" DESRAT (Guest)
on 2006-04-03 19:37
(Received via mailing list)
Et quel est ce message d'erreur ?

2006/4/3, Bolo M. <removed_email_address@domain.invalid>:
> >
> > > map.connect '', :controller => 'notes'
> > > > aussi celui du modèle (singulier de "notes").
> > > ActionController::Routing::Routes.draw do |map|
> > >    map.connect '', :controller => 'notes'
> > > >
> > > > > >
> > > > > > lance
> > > /Users/bolomichelin/Documents/Creation_Perso/Developement/monApp/public/../config/..
> > > > > >
> > > > Is
> > > > > >
> > > > Guillaume "Zifro" DESRAT
> > > > http://lists.rubyonrails.fr/mailman/listinfo/railsfrance
> > >
> > > Railsfrance mailing list
>
--
Guillaume "Zifro" DESRAT
http://.../
-- Aah Jeez...I Wish You Could See This....Lights Coming Up.....I've
Never Seen A Painting That Captures The Beauty Of The Ocean.....I'm
Gonna Make You Rich, Bud Fox....Rich Enough You Can Afford A Girl Like
Darien....This Is Your Wake-Up Call, Pall....Go To Work.....DROP IT!!!
(3 Steps Ahead - Drop It)
Bolo M. (Guest)
on 2006-04-03 19:46
(Received via mailing list)
Je l'ai mis dans mon message précédent

NameError in <controller not set>#<action not set>

uninitialized constant NoteController
RAILS_ROOT:
/Users/bolomichelin/Documents/Creation_Perso/Developement/monApp/public/../config/..

Application Trace | Framework Trace | Full Trace
/Applications/Locomotive/Bundles/rails-1.0.0-max.bundle/Contents/Resources/ports/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active_support/dependencies.rb:200:in
`const_missing'
/Applications/Locomotive/Bundles/rails-1.0.0-max.bundle/Contents/Resources/ports/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active_support/dependencies.rb:72:in
`const_missing'
generated/routing/recognition.rb:4:in `recognize_path'
This error occured while loading the following files:
  note_controller.rb

2006/4/3, Guillaume Zifro DESRAT <removed_email_address@domain.invalid>:
Guillaume "Zifro" DESRAT (Guest)
on 2006-04-03 19:59
(Received via mailing list)
Tu parlais d'un "nouveau" message d'erreur. J'ai cru que c'était
quelquechose d'autre encore.

A la lecture du message d'erreur, il semble toujours que ton
contrôleur "Note" n'existe pas.
Peux-tu créer une autre application Rails, pour voir si le problème
est localisée à celle-ci ou bien à tout Rails ?

J'avais lu ici et là que la version de Ruby distribuée avec MacOS X
était bugguée ("MacOS X ships with a broken version of Ruby"). Ne
serait-ce pas le cas chez toi ?

Si les problèmes persistent, envoie nous en pièce jointe l'intégralité
de ton fichier routes.rb et le listing du répertoire et des
sous-répertoires application/.

Ainsi nous pourrons y vir plus clair et t'aider.


Bon courage.

2006/4/3, Bolo M. <removed_email_address@domain.invalid>:
> 
/Applications/Locomotive/Bundles/rails-1.0.0-max.bundle/Contents/Resources/ports/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active_support/dependencies.rb:72:in
> > > J'ai fais les corrections , j'ai un nouveau message d'erreur
> > > > 
/Applications/Locomotive/Bundles/rails-1.0.0-max.bundle/Contents/Resources/ports/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active_support/dependencies.rb:200:in
> > > > >  Le contrôleur s'appelle "note", donc il faut écrire map.connect '',
> > > > > Byzaremment je vois qu'il change welcome par 'notes' . Je suis pe fatiguée
> > > > >   # The priority is based upon order of creation: first created ->
> > > > >   # Allow downloading Web Service WSDL as a file with an extension
> > > > > > Le 01/04/06, Bolo M. <removed_email_address@domain.invalid > a écrit :
> > > > > > > > Le 01/04/06, Bolo M. <removed_email_address@domain.invalid > a écrit :
> > > > > > > > http://localhost:3000/
> > > > > > > > Ca veut dire quoi ?
> > > > > > > > --
> > > > > > Drop
> > > > > > > Railsfrance mailing list
> > > > > > -- Aah Jeez...I Wish You Could See This....Lights Coming Up.....I've Never
> > > > > >
> > > > > --
> > > > > http://lists.rubyonrails.fr/mailman/listinfo/railsfrance
> >
> > Railsfrance mailing list
> > removed_email_address@domain.invalid
> > http://lists.rubyonrails.fr/mailman/listinfo/railsfrance
> >
> >
> >
> _______________________________________________
> Railsfrance mailing list
> removed_email_address@domain.invalid
> http://lists.rubyonrails.fr/mailman/listinfo/railsfrance
>


--
Guillaume "Zifro" DESRAT
http://.../
-- Aah Jeez...I Wish You Could See This....Lights Coming Up.....I've
Never Seen A Painting That Captures The Beauty Of The Ocean.....I'm
Gonna Make You Rich, Bud Fox....Rich Enough You Can Afford A Girl Like
Darien....This Is Your Wake-Up Call, Pall....Go To Work.....DROP IT!!!
(3 Steps Ahead - Drop It)
Marion (Guest)
on 2006-08-04 20:36
Bolo M. wrote:
> Salut,
>
> j'ai suivi ce tuto
> http://www.illanti.com/files/locomotive101.mov
>
> Apres avoir modifier la page route et supprimer la page index.html , je
> lance
>
> http://localhost:3000/
>
> mais j'ai ce message
> NameError in Notes#index
>
> uninitialized constant Note
> RAILS_ROOT:
> /Users/bolomichelin/Documents/Creation_Perso/Developement/monApp/public/../config/..
>
> Ca veut dire quoi ?
>
> Bolo

Pardonnez ma francais s'il vous plait, mais, j'avais le probleme aussi,
et j'ai trouvé le solution. Le .mov est mal, je croye...fais:

$ mysqladmin -u root -p create expenses_development
...
$ script/generate migration accounts
...
Fais db/migrate/001_accounts.rb:
...
class Accounts < ActiveRecord::Migration
  def self.up
    create_table :accounts do |table|
      table.column :name, :string
      table.column :budget, :float
    end
  end
  def self.down
    drop_table :accounts
  end
end
...
$ rake migrate
...
$ script/generate scaffold account expenses

Donc, "routes.db" est:

map.connect '', :controller => 'expenses'

(J'ai lu http://developer.apple.com/tools/rubyonrails.html)

Bon chance,

-- Marion (avec Français de lycée)
This topic is locked and can not be replied to.