簡體   English   中英

Rails 不會安裝

[英]Rails won't install

首先,我對 rails 還很陌生,我相信這個問題會顯示出來。 我正要按照 gorails.com 上的步驟設置本地服務器。 當我可以訪問互聯網時,我也使用 codeanywhere。 當我嘗試安裝 (rails new myapp) rails 時,我的終端命令不斷收到以下錯誤

extconf failed, exit code 1

Gem files will remain installed in
/var/folders/0d/yx9wdh954jjbn_pnn5nbm5540000gn/T/bundler20190310-64475-5t7xkksqlite3-1.4.0/gems/sqlite3-1.4.0
for inspection.
Results logged to
/var/folders/0d/yx9wdh954jjbn_pnn5nbm5540000gn/T/bundler20190310-64475-5t7xkksqlite3-1.4.0/extensions/universal-darwin-17/2.3.0/sqlite3-1.4.0/gem_make.out

An error occurred while installing sqlite3 (1.4.0), and Bundler cannot
continue.
Make sure that `gem install sqlite3 -v '1.4.0' --source 'https://rubygems.org/'`
succeeds before bundling.

In Gemfile:
  sqlite3
         run  bundle exec spring binstub --all
Could not find gem 'uglifier (>= 1.3.0)' in any of the gem sources listed in your Gemfile.
Run `bundle install` to install missing gems."

對此事的任何幫助將不勝感激。 提前致謝。

請編輯名為Gemfile ruby rails 項目中的文件並更改以下內容

gem  'sqlite3'

gem 'sqlite3', '~> 1.3.11'

現在運行以下命令來安裝 Gem

bundle install

現在運行你的 Rails 項目

rails s

我認為您缺少 sqlite3。 運行命令

sudo apt-get install -y sqlite3 libsqlite3-dev

然后修改gemfile為

gem 'sqlite3', '~> 1.3.11'

然后運行

bundle install

在 rails 中,一些軟件包需要安裝在您的本地,然后它們可以包含在您的 gemfile 中。 這同樣適用於mysqlpsql

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM