I''ve learned the basics of Ruby, and have been making websites with xhtml, css, and eruby. I used IO.readlines and text files to store and access info on menu items (http://partysushi.com/menu.rhtml) but it is apparent that an SQL database would be a better way to deal with that sort of thing. I understand the concept and immediate benefits of using a database (that IO stuff is a rudimentary database isn''t it?) but I don''t know where to start in learning how to use one. I see two basic categories of books and help-me things: Programming with Ruby and Ruby on Rails. I was under the impression that getting a Rails book would be the quickest way to learn to use a database, but going through http://www.onlamp.com/pub/a/onlamp/2006/12/14/revisiting-ruby-on-rails-revisited.html I don''t think I need a whole framework, and it''s all still over my head. I don''t like the look of all those generated files and directories. I just want a database, can''t I just have a database? -- 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 -~----------~----~----~----~------~----~------~--~---
On 4/12/07, Jonathan Denni <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > I''ve learned the basics of Ruby, and have been making websites with > xhtml, css, and eruby. I used IO.readlines and text files to store and > access info on menu items (http://partysushi.com/menu.rhtml) but it is > apparent that an SQL database would be a better way to deal with that > sort of thing. I understand the concept and immediate benefits of using > a database (that IO stuff is a rudimentary database isn''t it?) but I > don''t know where to start in learning how to use one.> I don''t think I need a whole framework, and it''s all still over my head. > I don''t like the look of all those generated files and directories. I > just want a database, can''t I just have a database?Ruby has to my knowledge, 3 primary ways of using a Database. Rails is famous for using ActiveRecord, but ActiveRecord can be used independently of Rails. Its well worth learning as it makes database use very easy indeed. Another Ruby framework Nitro uses a database layer called Og (ObjectGraph) which I presume (not sure) can be used externally to Nitro. Lastly theres the default, DBI. This is a more conventional database access library, where you are kept pretty close to the SQL mechanisms. --~--~---------~--~----~------------~-------~--~----~ 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''d say using rails is a bit of overkill, and you seem to have come to this conclusion as well. i''d also go so far as to say that using activerecord would be overkill for something simple like your menu. you most likely would never use the things that make activerecord beneficial. if you want something more lightweight than activerecord, check out DBI, which was suggested previously. as far as the actual database goes, you might want to take a look at sqlite3 as opposed to something like mysql/postgresql/etc. On 4/12/07, Richard Conroy <richard.conroy-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > On 4/12/07, Jonathan Denni <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote: > > > > I''ve learned the basics of Ruby, and have been making websites with > > xhtml, css, and eruby. I used IO.readlines and text files to store and > > access info on menu items (http://partysushi.com/menu.rhtml) but it is > > apparent that an SQL database would be a better way to deal with that > > sort of thing. I understand the concept and immediate benefits of using > > a database (that IO stuff is a rudimentary database isn''t it?) but I > > don''t know where to start in learning how to use one. > > > I don''t think I need a whole framework, and it''s all still over my head. > > I don''t like the look of all those generated files and directories. I > > just want a database, can''t I just have a database? > > Ruby has to my knowledge, 3 primary ways of using a Database. > Rails is famous for using ActiveRecord, but ActiveRecord can be used > independently of Rails. Its well worth learning as it makes database > use very easy indeed. > > Another Ruby framework Nitro uses a database layer called Og (ObjectGraph) > which I presume (not sure) can be used externally to Nitro. > > Lastly theres the default, DBI. This is a more conventional database access > library, where you are kept pretty close to the SQL mechanisms. > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Chris Hall wrote:> I''d say using rails is a bit of overkill, and you seem to have come > to this conclusion as well. i''d also go so far as to say that using > activerecord would be overkill for something simple like your menu. > you most likely would never use the things that make activerecord > beneficial. > > if you want something more lightweight than activerecord, check out > DBI, which was suggested previously. as far as the actual database > goes, you might want to take a look at sqlite3 as opposed to something > like mysql/postgresql/etc.That sounds perfect! Now the question is: How do I learn to use DBI and SQLite? Any suggestions on books and or tutorials? Thanks! -- 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 -~----------~----~----~----~------~----~------~--~---
> That sounds perfect! Now the question is: How do I learn to use DBI and > SQLite? Any suggestions on books and or tutorials?Oh, well, I''m using site5 hosting, and it already has MySQL installed. There''s even a page in the account manager to add MySQL databases. Since it''s already installed, I guess I''ll use that. But I still have to find out how to use it. -- 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 -~----------~----~----~----~------~----~------~--~---
dbi: http://ruby-dbi.rubyforge.org/ sqlite3: http://www.sqlite.org/ On 4/12/07, Jonathan Denni <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > Chris Hall wrote: > > I''d say using rails is a bit of overkill, and you seem to have come > > to this conclusion as well. i''d also go so far as to say that using > > activerecord would be overkill for something simple like your menu. > > you most likely would never use the things that make activerecord > > beneficial. > > > > if you want something more lightweight than activerecord, check out > > DBI, which was suggested previously. as far as the actual database > > goes, you might want to take a look at sqlite3 as opposed to something > > like mysql/postgresql/etc. > > That sounds perfect! Now the question is: How do I learn to use DBI and > SQLite? Any suggestions on books and or tutorials? > > Thanks! > > -- > 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 -~----------~----~----~----~------~----~------~--~---
download for ruby-dbi is: http://rubyforge.org/projects/ruby-dbi/ On 4/12/07, Chris Hall <christopher.k.hall-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> dbi: > > http://ruby-dbi.rubyforge.org/ > > sqlite3: > > http://www.sqlite.org/ > > On 4/12/07, Jonathan Denni <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote: > > > > Chris Hall wrote: > > > I''d say using rails is a bit of overkill, and you seem to have come > > > to this conclusion as well. i''d also go so far as to say that using > > > activerecord would be overkill for something simple like your menu. > > > you most likely would never use the things that make activerecord > > > beneficial. > > > > > > if you want something more lightweight than activerecord, check out > > > DBI, which was suggested previously. as far as the actual database > > > goes, you might want to take a look at sqlite3 as opposed to something > > > like mysql/postgresql/etc. > > > > That sounds perfect! Now the question is: How do I learn to use DBI and > > SQLite? Any suggestions on books and or tutorials? > > > > Thanks! > > > > -- > > 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 -~----------~----~----~----~------~----~------~--~---
Chris Hall wrote:> download for ruby-dbi is: > > http://rubyforge.org/projects/ruby-dbi/Thanks! So, it looks like I should 1)I download download the dbi-0.1.1.tar.gz file, and upload it to my server. Where should I put it? The cgi-bin directory? 2) Unpack it using command %tar zxf dbi-0.1.1.tar.gz (chdir to the right directory, then) 3) input command %ruby setup.rb config --with=dbi,dbd_mysql to configure it to install dbi and the MySQL drivers (since I''m using the already availabe MySQL database) 4) input %ruby setup.rb setup %ruby setup.rb install and once I do that, Ruby DBI will be all set and ready to use, right? -- 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 -~----------~----~----~----~------~----~------~--~---
see the first link i sent, that has the installation instructions for ruby-dbi http://ruby-dbi.rubyforge.org/ if you are on shared hosting, then your provider may already have dbi installed. you''d have to talk to them to know for sure (or write a test script). On 4/13/07, Jonathan Denni <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > Chris Hall wrote: > > download for ruby-dbi is: > > > > http://rubyforge.org/projects/ruby-dbi/ > > Thanks! > So, it looks like I should > > 1)I download download the dbi-0.1.1.tar.gz file, and upload it to my > server. Where should I put it? The cgi-bin directory? > > 2) Unpack it using command > %tar zxf dbi-0.1.1.tar.gz > > (chdir to the right directory, then) > > 3) input command > %ruby setup.rb config --with=dbi,dbd_mysql > to configure it to install dbi and the MySQL drivers (since I''m using > the already availabe MySQL database) > > 4) input %ruby setup.rb setup > %ruby setup.rb install > > > and once I do that, Ruby DBI will be all set and ready to use, right? > > -- > 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 -~----------~----~----~----~------~----~------~--~---
Chris Hall wrote:> see the first link i sent, that has the installation instructions for > ruby-dbiYeah. I don''t have much experience with this sort of thing, so I just wanted to make sure I understood those instructions correctly.> if you are on shared hosting, then your provider may already have dbi > installed. you''d have to talk to them to know for sure (or write a > test script).Oh, I''ll try that :D Thanks again -- 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 -~----------~----~----~----~------~----~------~--~---
> I don''t think I need a whole framework, and it''s all still over my head. > I don''t like the look of all those generated files and directories. I > just want a database, can''t I just have a database?Hi Jonathan Have a look at Sequel. It''s a very simple and efficient database access and ORM library for Ruby. Docs are here: http://sequel.rubyforge.org/ Best Sharon -- 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 -~----------~----~----~----~------~----~------~--~---