Note that there are some explanatory texts on larger screens.

plurals
  1. POTrouble Getting the Rails Server Started
    text
    copied!<p>When I run 'rails server' I get the following error: </p> <pre><code>Could not find gem 'sqlite3 (&gt;= 0, runtime)' in any of the gem sources listed in your Gemfile. </code></pre> <p>My GemFile looks like this: <code>gem 'sqlite3'</code></p> <p>Also when I run the port command it says it does not recognize that command: </p> <pre><code>Mohammad-Azams-MacBook-Pro:blog azamsharp$ port install sqlite3 +universal -bash: port: command not found </code></pre> <p>Any suggestions?</p> <p><strong>UPDATE 1:</strong> </p> <p>I run sudo gem install sqlite3 and got the following message:</p> <pre><code>Mohammad-Azams-MacBook-Pro:blog azamsharp$ sudo gem install sqlite3 Building native extensions. This could take a while... ERROR: Error installing sqlite3: ERROR: Failed to build gem native extension. /usr/local/bin/ruby extconf.rb checking for sqlite3.h... yes checking for sqlite3_libversion_number() in -lsqlite3... no sqlite3 is missing. Try 'port install sqlite3 +universal' or 'yum install sqlite3-devel' and check your shared library search path (the location where your sqlite3 shared library is located). *** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options. </code></pre> <p><strong>UPDATE 2</strong>: (Contents of GemFile) </p> <pre><code>source 'http://rubygems.org' gem 'rails', '3.0.7' # Bundle edge Rails instead: # gem 'rails', :git =&gt; 'git://github.com/rails/rails.git' gem 'sqlite3' # Use unicorn as the web server # gem 'unicorn' # Deploy with Capistrano # gem 'capistrano' # To use debugger (ruby-debug for Ruby 1.8.7+, ruby-debug19 for Ruby 1.9.2+) # gem 'ruby-debug' # gem 'ruby-debug19', :require =&gt; 'ruby-debug' # Bundle the extra gems: # gem 'bj' # gem 'nokogiri' # gem 'sqlite3-ruby', :require =&gt; 'sqlite3' # gem 'aws-s3', :require =&gt; 'aws/s3' # Bundle gems for the local environment. Make sure to # put test-only gems in this group so their generators # and rake tasks are available in development mode: # group :development, :test do # gem 'webrat' # end </code></pre> <p>UPDATE 3: </p> <p><code>Mohammad-Azams-MacBook-Pro:blog azamsharp$ port search sqlite3 -bash: port: command not found </code></p> <p><strong>UPDATE 4:</strong> </p> <p>After downloading the install Macports I ran the bundle install again and here is the result: </p> <p><code>Installing sqlite3 (1.3.3) with native extensions /usr/local/lib/ruby/site_ruby/1.8/rubygems/installer.rb:483:in</code>build_extensions': ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError)</p> <p>/usr/local/bin/ruby extconf.rb checking for sqlite3.h... yes checking for sqlite3_libversion_number() in -lsqlite3... no sqlite3 is missing. Try 'port install sqlite3 +universal' or 'yum install sqlite3-devel' and check your shared library search path (the location where your sqlite3 shared library is located). <strong>* extconf.rb failed *</strong> Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options.</p> <p>`</p> <p><strong>UPDATE 5:</strong> </p> <p>which sqlite3 gives me the following: </p> <pre><code>Mohammad-Azams-MacBook-Pro:blog azamsharp$ which sqlite3 /opt/local/bin/sqlite3 </code></pre> <p><strong>UPDATE 5:</strong> </p> <p>which -a sqlite3 gives me the following: </p> <pre><code>Mohammad-Azams-MacBook-Pro:blog azamsharp$ which -a sqlite3 /opt/local/bin/sqlite3 /usr/local/bin/sqlite3 /usr/bin/sqlite3 </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload