wolfbyte18-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2009-Jun-26 22:55 UTC
First application: Alternatives to creating a database?
Hi, I''ve done a bit of web development work, but decided to try something new after I got into a fight with PHP over regular expressions. I figured I''d have nothing to do by trying out Rails, so here I am. I''m following along the getting started guide: http://guides.rubyonrails.org/getting_started.html However, I just hit my first snag. "rake db:create" is returning the error "Couldn''t create the database for... etc.". I get the impression that this will attempt to create the database, which would explain the error: With my webhost, the database users aren''t allowed to create new databases; that needs to be done from the web panel. How can I -connect- to a (remote) database and build the needed tables, but not -create- an entirely new database? Thanks, I appreciate it. Eric
Simon Macneall
2009-Jun-27 11:19 UTC
Re: First application: Alternatives to creating a database?
Hi, I assume you have set up your database.yml file correctly, then just create the db manually using using the webpanel, and then run rake db:migrate to create all your tables. Simon On Sat, 27 Jun 2009 06:55:54 +0800, wolfbyte18-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org <wolfbyte18-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > Hi, > > I''ve done a bit of web development work, but decided to try something > new after I got into a fight with PHP over regular expressions. I > figured I''d have nothing to do by trying out Rails, so here I am. > > I''m following along the getting started guide: > http://guides.rubyonrails.org/getting_started.html > > However, I just hit my first snag. "rake db:create" is returning the > error "Couldn''t create the database for... etc.". I get the > impression that this will attempt to create the database, which would > explain the error: With my webhost, the database users aren''t allowed > to create new databases; that needs to be done from the web panel. > > How can I -connect- to a (remote) database and build the needed > tables, but not -create- an entirely new database? Thanks, I > appreciate it. > > Eric > >
Colin Law
2009-Jun-27 13:15 UTC
Re: First application: Alternatives to creating a database?
2009/6/26 wolfbyte18-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org <wolfbyte18-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>:> > Hi, > > I''ve done a bit of web development work, but decided to try something > new after I got into a fight with PHP over regular expressions. I > figured I''d have nothing to do by trying out Rails, so here I am. > > I''m following along the getting started guide: > http://guides.rubyonrails.org/getting_started.html > > However, I just hit my first snag. "rake db:create" is returning the > error "Couldn''t create the database for... etc.". I get the > impression that this will attempt to create the database, which would > explain the error: With my webhost, the database users aren''t allowed > to create new databases; that needs to be done from the web panel. > > How can I -connect- to a (remote) database and build the needed > tables, but not -create- an entirely new database? Thanks, I > appreciate it. >You might want to consider installing rails on your pc and developing locally initially rather than running on a remote server. Colin
Älphä Blüë
2009-Jun-28 03:16 UTC
Re: First application: Alternatives to creating a database?
Use the following link: http://www.buildingwebapps.com/learningrails The entire screencast selection is free and will walk you through creating an entire CMS system and getting your feet wet with database building, etc. You''ll learn all of the basic elements of rails and it really does help. It''s the most complete first app you''ll build and some of what they teach you is incredibly useful from an administration point of view. Take care and good luck. I also suggest reading the following books: Agile Web Development with Rails 3rd Edition Enterprise Integration with Rails (for DB and associations) Apress Beginning Ruby from Novice to Professional (for ruby howtos) Then there are a lot of guide sites to get you started... http://guides.rubyonrails.org/ -- Posted via http://www.ruby-forum.com/.
Eric Vernon
2009-Jun-28 16:49 UTC
Re: First application: Alternatives to creating a database?
Many thanks, that did it for me! Cheers. On Jun 27, 7:19 am, "Simon Macneall" <macne...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi, > > I assume you have set up your database.yml file correctly, then just > create the db manually using using the webpanel, and then run rake > db:migrate to create all your tables. > > Simon > > On Sat, 27 Jun 2009 06:55:54 +0800, wolfbyt...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org > > <wolfbyt...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Hi, > > > I''ve done a bit of web development work, but decided to try something > > new after I got into a fight with PHP over regular expressions. I > > figured I''d have nothing to do by trying out Rails, so here I am. > > > I''m following along the getting started guide: > >http://guides.rubyonrails.org/getting_started.html > > > However, I just hit my first snag. "rake db:create" is returning the > > error "Couldn''t create the database for... etc.". I get the > > impression that this will attempt to create the database, which would > > explain the error: With my webhost, the database users aren''t allowed > > to create new databases; that needs to be done from the web panel. > > > How can I -connect- to a (remote) database and build the needed > > tables, but not -create- an entirely new database? Thanks, I > > appreciate it. > > > Eric