Topic: SQLite & Locally Installing Gems

I am a rubby noob (came from PHP) and I have been reading the new edition of agile programming with rails. I use the shared host bluehost which supports ruby on rails. Bluehost installs only the required gems (eg. ActionPack, ActionMailer, Rake, etc). So I know I am going to sound dumb but how do I locally install gems (eg. put in vendor directory). How would I go about doing that.

Also I want to learn how to use sqlite. I do not care whether it is sqlite2 or 3 I just would like to use sqlite. I have tried using sqlite (in the depot app from the book) but I get an error during scafolding. Is there any changes I need to make in order to use sqlite?

If it is too difficult please tell me as I don't have a problem using mysql. I just want to be able to more easily distribute my rails applications. Just an upload and maybe edit a few files process. But it would be ideal not to have people need to use SSH.

I will surely be asking more questions. I have heard how awesome rails is. I tried out cakePHP and Symfony but than I just figured why don't I just go with the real thing. So now I just started using rails this weekend and even though I have had a few wierd errors it has simply been a dream. The sheer speed, the scafolding, the way RoR guides you through app making while still giving you control. I am shocked to be able to make an application so fast. So anyways I am in love with rails. Right before I even began to learn rails (although I messed around wit it a few months ago) I got a project to design a dynamic website for a second life magizine (the video game).

Founder of the Open Education Software Foundation (oeducate.org). PHP migrator swimming across the PHP straits to get to the promise rails. (im cuban it was the only thing i could think of >.<)

Re: SQLite & Locally Installing Gems

Locally installing gems:

~/yourrailsapppath/vendor$ gem unpack [gem_name]

Do this before you upload to your server; replace [gem_name] with whatever (i.e. RedCloth). Be sure you're in the vendor directory of your app though.

As for sqlite, do you have it installed? What OS are you using? What's the error you get when trying to use sqlite for the Depot app?

vinnie - rails forum admin

Re: SQLite & Locally Installing Gems

I am using instarails on WINDOWS XP. I get an "ActionController" exeception that says, "Synatax error "Insert INTO () VALUES ()"

I just used the dynamic scaffolding.

For gems do you mean download the tar.gz package and un zip it or do u mean get the .gem package.

Thanks a lot!

Last edited by aceofspades (2006-12-19 12:07:14)

Founder of the Open Education Software Foundation (oeducate.org). PHP migrator swimming across the PHP straits to get to the promise rails. (im cuban it was the only thing i could think of >.<)

Re: SQLite & Locally Installing Gems

Did you actually set up your database by running

rake db:migrate

on the command line?

For gems, I mean install it on your computer first:

gem install RedCloth

Then unpack it to your app's /vendor directory using
gem unpack RedCloth

vinnie - rails forum admin

Re: SQLite & Locally Installing Gems

Yes i did use rake db:migrate. I am going to try it again and post the error page.

Thanks for the help with the gems I get what you mean now.

Last edited by aceofspades (2006-12-19 14:47:19)

Founder of the Open Education Software Foundation (oeducate.org). PHP migrator swimming across the PHP straits to get to the promise rails. (im cuban it was the only thing i could think of >.<)