Trouble Getting the Rails Server Started

后端 未结 6 2058
逝去的感伤
逝去的感伤 2021-01-25 23:43

When I run \'rails server\' I get the following error:

Could not find gem \'sqlite3 (>= 0, runtime)\' in any of the gem sources listed in your Gemfile.
         


        
6条回答
  •  灰色年华
    2021-01-26 00:11

    If you have problems talking about /usr/local/bin/ruby extconf.rb checking for sqlite3.h then it's probably something to do with macports.

    First, make sure you have xcode installed. Run:

    gcc
    

    and you should get:

    i686-apple-darwin10-gcc-4.2.1: no input files
    

    If you do, then let's install homebrew

    Then, a list of commands to install homebrew, update rubygems, and upgrade rails

    brew install sqlite
    gem update --system
    gem install bundler
    gem install rails -v=3.0.8
    

    Then, to check, rails -v should output Rails 3.0.7

提交回复
热议问题