Hello, I''m a complete beginner in Ruby on Rails, so excuse me if this is a ridiculous question. Just to bare in mind, I''m using Mac OSX (Snow Leopard), Rails 3, and sqlite3 as a database. I''ve checked, and everything is up to date (Rails, Ruby, Gems). I am simply creating a test application, and I understand the way to run that is by running the ''rails server'' command in Terminal. Unfortunately, that results in an error message (in red) saying ''Could not find gem ''sqlite3 (>= 0, runtime)'' in any of the gem sources listed in your Gemfile.'' Now I''ve checked if sqlite3 is listed in the GemFile, and it is. Here''s what it says (this is just the first part of the GemFile, I didn''t want to post the whole thing of course): source ''http://rubygems.org'' gem ''rails'', ''3.0.4'' # Bundle edge Rails instead: # gem ''rails'', :git => ''git://github.com/rails/rails.git'' gem ''sqlite3'' # Use unicorn as the web server # gem ''unicorn'' It may have to do with my database.yml file, which is setup like this: ''# SQLite version 3.x # gem install sqlite3 development: adapter: sqlite3 database: db/development.sqlite3 pool: 5 timeout: 5000'' Is the default setup correct? If not, what would be an appropriate way to set it up? On a sidenote, if anyone knows how to get rid of MySQL (to start fresh) on a mac, please let me know. I''m not sure where the default installation is, and I would like to get rid of it. Thanks, From Jake Attachments: http://www.ruby-forum.com/attachment/5894/Gemfile http://www.ruby-forum.com/attachment/5895/database.yml -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 12 February 2011 21:10, Jake Byman <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> Hello, > > I''m a complete beginner in Ruby on Rails, so excuse me if this is a > ridiculous question. Just to bare in mind, I''m using Mac OSX (Snow > Leopard), Rails 3, and sqlite3 as a database. I''ve checked, and > everything is up to date (Rails, Ruby, Gems). I am simply creating a > test application, and I understand the way to run that is by running the > ''rails server'' command in Terminal. Unfortunately, that results in an > error message (in red) saying ''Could not find gem ''sqlite3 (>= 0, > runtime)'' in any of the gem sources listed in your Gemfile.'' > > Now I''ve checked if sqlite3 is listed in the GemFile, and it is. Here''s > what it says (this is just the first part of the GemFile, I didn''t want > to post the whole thing of course):Have you run bundle install If so what does it say about sqlite3 in Gemfile.lock?> > source ''http://rubygems.org'' > > gem ''rails'', ''3.0.4'' > > # Bundle edge Rails instead: > # gem ''rails'', :git => ''git://github.com/rails/rails.git'' > > gem ''sqlite3'' > > # Use unicorn as the web server > # gem ''unicorn'' > > It may have to do with my database.yml file, which is setup like this: > > ''# SQLite version 3.x > # gem install sqlite3 > development: > adapter: sqlite3 > database: db/development.sqlite3 > pool: 5 > timeout: 5000'' > > Is the default setup correct? If not, what would be an appropriate way > to set it up? > > On a sidenote, if anyone knows how to get rid of MySQL (to start fresh) > on a mac, please let me know. I''m not sure where the default > installation is, and I would like to get rid of it. > > Thanks, > > From Jake > > Attachments: > http://www.ruby-forum.com/attachment/5894/Gemfile > http://www.ruby-forum.com/attachment/5895/database.yml > > > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. > For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Let me qualify the fact that I am still getting up to speed with bundler, so take this advice with a grain of salt. I don''t know if this is still necessary, but in my Gemfile I have: gem ''sqlite3-ruby'', :require => ''sqlite3'' So the gem I''m using is sqlite3-ruby but the library is sqlite3. If just running bundle install doesn''t work, you might try changing the gemfile as above and then rerunning bundler (bundle install), Best Wishes, Peter On Feb 12, 2011, at 4:14 PM, Colin Law wrote:> On 12 February 2011 21:10, Jake Byman <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote: >> Hello, >> >> I''m a complete beginner in Ruby on Rails, so excuse me if this is a >> ridiculous question. Just to bare in mind, I''m using Mac OSX (Snow >> Leopard), Rails 3, and sqlite3 as a database. I''ve checked, and >> everything is up to date (Rails, Ruby, Gems). I am simply creating a >> test application, and I understand the way to run that is by running the >> ''rails server'' command in Terminal. Unfortunately, that results in an >> error message (in red) saying ''Could not find gem ''sqlite3 (>= 0, >> runtime)'' in any of the gem sources listed in your Gemfile.'' >> >> Now I''ve checked if sqlite3 is listed in the GemFile, and it is. Here''s >> what it says (this is just the first part of the GemFile, I didn''t want >> to post the whole thing of course): > > Have you run > bundle install > If so what does it say about sqlite3 in Gemfile.lock? > >> >> source ''http://rubygems.org'' >> >> gem ''rails'', ''3.0.4'' >> >> # Bundle edge Rails instead: >> # gem ''rails'', :git => ''git://github.com/rails/rails.git'' >> >> gem ''sqlite3'' >> >> # Use unicorn as the web server >> # gem ''unicorn'' >> >> It may have to do with my database.yml file, which is setup like this: >> >> ''# SQLite version 3.x >> # gem install sqlite3 >> development: >> adapter: sqlite3 >> database: db/development.sqlite3 >> pool: 5 >> timeout: 5000'' >> >> Is the default setup correct? If not, what would be an appropriate way >> to set it up? >> >> On a sidenote, if anyone knows how to get rid of MySQL (to start fresh) >> on a mac, please let me know. I''m not sure where the default >> installation is, and I would like to get rid of it. >> >> Thanks, >> >> From Jake >> >> Attachments: >> http://www.ruby-forum.com/attachment/5894/Gemfile >> http://www.ruby-forum.com/attachment/5895/database.yml >> >> >> -- >> 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en. >> >> > > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en. >-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
I have run bundle install, and that runs fine. The ''rake db:create'' command also produces the same error. To peter, if you had seen the attached GemFile, it does say additionally that part as one of the gems. Apologies for not initially writing 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 13 February 2011 00:04, Jake Byman <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> I have run bundle install, and that runs fine. The ''rake db:create'' > command also produces the same error. > > To peter, if you had seen the attached GemFile, it does say additionally > that part as one of the gems. Apologies for not initially writing it.But the one # gem ''sqlite3-ruby'', :require => ''sqlite3'' is commented out (it starts with #). I think Peter is probably right. Remove the line gem ''sqlite3'' and uncomment the currently commented out one. Then run bundle install again. Colin -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Nope, still no luck, same error, nothing new. :( Grrr...this is very frustrating. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 13 February 2011 16:26, Jake Byman <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> Nope, still no luck, same error, nothing new. :(Please don''t top post, it makes it difficult to follow the thread. Insert your reply at appropriate places in previous message. Thanks Paste you Gemfile and Gemfile.lock here please. Colin -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
As a side note question, should Gemfile.lock be added to the repository and uploaded to the production server? -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 13 February 2011 16:35, Fernando Perez <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> As a side note question, should Gemfile.lock be added to the repository > and uploaded to the production server?This would have been better as a new thread since it is nothing to do with the OPs problem as far as I know. You should run bundle install on the production server, so I suppose the answer is no, though I have not used bundler on a production server yet, so others may correct me. Colin -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Feb 13, 2011, at 11:35 AM, Fernando Perez wrote:> As a side note question, should Gemfile.lock be added to the repository > and uploaded to the production server?Generally it''s not a good idea to include generated artifacts in a repository, but I do check my gemfile.lock in for a number of reasons. Firstly it''s good documentation as it shows clearly in the commit log the gems, versions and dependencies (and you can easily see what new dependencies are introduced with each gem which can be useful). Also, my understanding is that in production mode, the --deployment flag should be used, and that required a gemfile.lock to ensure your production version is using the same versions that you tested in dev and production. Yehuda posted something on this: http://yehudakatz.com/2010/12/16/clarifying-the-roles-of-the-gemspec-and-gemfile/ The key is the third paragraph. Best Wishes, Peter> > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en. >-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 13 February 2011 17:03, Peter Bell <peter-AS9tOuWgs4cAvxtiuMwx3w@public.gmane.org> wrote:> ... > Yehuda posted something on this: > http://yehudakatz.com/2010/12/16/clarifying-the-roles-of-the-gemspec-and-gemfile/Excellent link, thanks for posting it. Highly recommended for anyone not clear on what bundler and Gemfiles are all about. Colin -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.