Hi everyone, First of all, I''m running Mac OS X Snow Leopard. Trying to set up a new SQLite database, but when I run rake db:create, I get the following huge message: unable to open database file /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/ sqlite3_adapter.rb:13:in `initialize'' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/ sqlite3_adapter.rb:13:in `new'' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/ sqlite3_adapter.rb:13:in `sqlite3_connection'' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/ abstract/connection_pool.rb:223:in `send'' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/ abstract/connection_pool.rb:223:in `new_connection'' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/ abstract/connection_pool.rb:245:in `checkout_new_connection'' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/ abstract/connection_pool.rb:188:in `checkout'' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/ abstract/connection_pool.rb:184:in `loop'' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/ abstract/connection_pool.rb:184:in `checkout'' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ 1.8/monitor.rb:242:in `synchronize'' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/ abstract/connection_pool.rb:183:in `checkout'' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/ abstract/connection_pool.rb:98:in `connection'' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/ abstract/connection_pool.rb:326:in `retrieve_connection'' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/ abstract/connection_specification.rb:123:in `retrieve_connection'' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/ abstract/connection_specification.rb:115:in `connection'' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ gems/1.8/gems/rails-2.3.5/lib/tasks/databases.rake:43:in `create_database'' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ gems/1.8/gems/rails-2.3.5/lib/tasks/databases.rake:31 /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ gems/1.8/gems/rake-0.8.3/lib/rake.rb:617:in `call'' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ gems/1.8/gems/rake-0.8.3/lib/rake.rb:617:in `execute'' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ gems/1.8/gems/rake-0.8.3/lib/rake.rb:612:in `each'' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ gems/1.8/gems/rake-0.8.3/lib/rake.rb:612:in `execute'' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ gems/1.8/gems/rake-0.8.3/lib/rake.rb:578:in `invoke_with_call_chain'' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ 1.8/monitor.rb:242:in `synchronize'' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ gems/1.8/gems/rake-0.8.3/lib/rake.rb:571:in `invoke_with_call_chain'' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ gems/1.8/gems/rake-0.8.3/lib/rake.rb:564:in `invoke'' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ gems/1.8/gems/rake-0.8.3/lib/rake.rb:2019:in `invoke_task'' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ gems/1.8/gems/rake-0.8.3/lib/rake.rb:1997:in `top_level'' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ gems/1.8/gems/rake-0.8.3/lib/rake.rb:1997:in `each'' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ gems/1.8/gems/rake-0.8.3/lib/rake.rb:1997:in `top_level'' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ gems/1.8/gems/rake-0.8.3/lib/rake.rb:2036:in `standard_exception_handling'' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ gems/1.8/gems/rake-0.8.3/lib/rake.rb:1991:in `top_level'' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ gems/1.8/gems/rake-0.8.3/lib/rake.rb:1970:in `run'' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ gems/1.8/gems/rake-0.8.3/lib/rake.rb:2036:in `standard_exception_handling'' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ gems/1.8/gems/rake-0.8.3/lib/rake.rb:1967:in `run'' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ gems/1.8/gems/rake-0.8.3/bin/rake:31 /usr/bin/rake:19:in `load'' /usr/bin/rake:19 Couldn''t create database for {"timeout"=>5000, "adapter"=>"sqlite3", "database"=>"db/development.sqlite3", "pool"=>5} "unable to open database file" seems like a strange error message to me because I''m not opening an existing one, I''m creating a new one. Any idea what could be going on here or how I can fix it? Thanks for your help. -- 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 know this will sound a little silly but do you have a db directory just below the application root? Rails should have created it. Do you have permission to access that directory? Do you have permission to create files in that directory? Maybe the application directory was created by a different user to the user who is running the db:create Does the file db/development.sqlite3 already exist? What permissions does it have? If it does not already exist what happens when you do this from the application root $ touch db/development.sqlite3 It should just create the file for you. -- 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 28 June 2010 20:49, Joe <x.lt0001-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi everyone, > > First of all, I''m running Mac OS X Snow Leopard. > > Trying to set up a new SQLite database, but when I run rake db:create, > I get the following huge message: > > > unable to open database file >... > Couldn''t create database for {"timeout"=>5000, "adapter"=>"sqlite3", > "database"=>"db/development.sqlite3", "pool"=>5}Just a guess, could it be a permissions issue? Do you have write permission in that folder? 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.
I''ve had an issue with the sqlite driver. What version are you using? Looking at the RubyForge site, they''ve released version 1.3.0 of sqlite3-ruby on June 6th - upgrading this might help On Jun 28, 3:49 pm, Joe <x.lt0...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi everyone, > > First of all, I''m running Mac OS X Snow Leopard. > > Trying to set up a new SQLite database, but when I run rake db:create, > I get the following huge message: > > unable to open database file > /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ > gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/ > sqlite3_adapter.rb:13:in `initialize'' > /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ > gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/ > sqlite3_adapter.rb:13:in `new'' > /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ > gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/ > sqlite3_adapter.rb:13:in `sqlite3_connection'' > /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ > gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/ > abstract/connection_pool.rb:223:in `send'' > /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ > gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/ > abstract/connection_pool.rb:223:in `new_connection'' > /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ > gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/ > abstract/connection_pool.rb:245:in `checkout_new_connection'' > /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ > gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/ > abstract/connection_pool.rb:188:in `checkout'' > /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ > gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/ > abstract/connection_pool.rb:184:in `loop'' > /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ > gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/ > abstract/connection_pool.rb:184:in `checkout'' > /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ > 1.8/monitor.rb:242:in `synchronize'' > /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ > gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/ > abstract/connection_pool.rb:183:in `checkout'' > /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ > gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/ > abstract/connection_pool.rb:98:in `connection'' > /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ > gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/ > abstract/connection_pool.rb:326:in `retrieve_connection'' > /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ > gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/ > abstract/connection_specification.rb:123:in `retrieve_connection'' > /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ > gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/ > abstract/connection_specification.rb:115:in `connection'' > /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ > gems/1.8/gems/rails-2.3.5/lib/tasks/databases.rake:43:in > `create_database'' > /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ > gems/1.8/gems/rails-2.3.5/lib/tasks/databases.rake:31 > /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ > gems/1.8/gems/rake-0.8.3/lib/rake.rb:617:in `call'' > /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ > gems/1.8/gems/rake-0.8.3/lib/rake.rb:617:in `execute'' > /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ > gems/1.8/gems/rake-0.8.3/lib/rake.rb:612:in `each'' > /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ > gems/1.8/gems/rake-0.8.3/lib/rake.rb:612:in `execute'' > /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ > gems/1.8/gems/rake-0.8.3/lib/rake.rb:578:in `invoke_with_call_chain'' > /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ > 1.8/monitor.rb:242:in `synchronize'' > /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ > gems/1.8/gems/rake-0.8.3/lib/rake.rb:571:in `invoke_with_call_chain'' > /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ > gems/1.8/gems/rake-0.8.3/lib/rake.rb:564:in `invoke'' > /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ > gems/1.8/gems/rake-0.8.3/lib/rake.rb:2019:in `invoke_task'' > /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ > gems/1.8/gems/rake-0.8.3/lib/rake.rb:1997:in `top_level'' > /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ > gems/1.8/gems/rake-0.8.3/lib/rake.rb:1997:in `each'' > /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ > gems/1.8/gems/rake-0.8.3/lib/rake.rb:1997:in `top_level'' > /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ > gems/1.8/gems/rake-0.8.3/lib/rake.rb:2036:in > `standard_exception_handling'' > /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ > gems/1.8/gems/rake-0.8.3/lib/rake.rb:1991:in `top_level'' > /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ > gems/1.8/gems/rake-0.8.3/lib/rake.rb:1970:in `run'' > /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ > gems/1.8/gems/rake-0.8.3/lib/rake.rb:2036:in > `standard_exception_handling'' > /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ > gems/1.8/gems/rake-0.8.3/lib/rake.rb:1967:in `run'' > /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ > gems/1.8/gems/rake-0.8.3/bin/rake:31 > /usr/bin/rake:19:in `load'' > /usr/bin/rake:19 > Couldn''t create database for {"timeout"=>5000, "adapter"=>"sqlite3", > "database"=>"db/development.sqlite3", "pool"=>5} > > "unable to open database file" seems like a strange error message to > me because I''m not opening an existing one, I''m creating a new one. > Any idea what could be going on here or how I can fix it? > > Thanks for your help.-- 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.