问题描述
我是Ruby和Rails的新手。我已经安装了node = v12.18.2,nvm = 0.32.1,yarn = 1.22.4,rbenv = 1.1.2,ruby = 2.7.1,rails = 6.0.3.2,sqlite3 = 3.28.0,通过自制软件openssl 。
我正在使用Mac。
当我尝试使用命令启动新项目时
rails new .
我有这个堆栈跟踪:
...
Fetching puma 4.3.5
Installing puma 4.3.5 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: /Users/kir/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/puma-4.3.5/ext/puma_http11
/Users/kir/.rbenv/versions/2.7.1/bin/ruby -I /Users/kir/.rbenv/versions/2.7.1/lib/ruby/2.7.0 -r ./siteconf20200822-18390-17806vx.rb extconf.rb --with-opt-dir\=/usr/local/opt/openssl
checking for BIO_read() in -lcrypto... yes
checking for SSL_CTX_new() in -lssl... yes
checking for openssl/bio.h... yes
checking for DTLS_method() in openssl/ssl.h... yes
checking for TLS_server_method() in openssl/ssl.h... yes
checking for SSL_CTX_set_min_proto_version in openssl/ssl.h... yes
creating Makefile
current directory: /Users/kir/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/puma-4.3.5/ext/puma_http11
make "DESTDIR=" clean
current directory: /Users/kir/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/puma-4.3.5/ext/puma_http11
make "DESTDIR="
compiling http11_parser.c
ext/puma_http11/http11_parser.c:44:18: warning: unused variable 'puma_parser_en_main' [-Wunused-const-variable]
static const int puma_parser_en_main = 1;
^
1 warning generated.
compiling io_buffer.c
compiling mini_ssl.c
mini_ssl.c:145:7: warning: unused variable 'min' [-Wunused-variable]
int min,ssl_options;
^
mini_ssl.c:299:40: warning: function 'raise_error' Could be declared with attribute 'noreturn' [-Wmissing-noreturn]
void raise_error(SSL* ssl,int result) {
^
2 warnings generated.
compiling puma_http11.c
puma_http11.c:203:22: error: implicitly declaring library function 'isspace' with type 'int (int)' [-Werror,-Wimplicit-function-declaration]
while (vlen > 0 && isspace(value[vlen - 1])) vlen--;
^
puma_http11.c:203:22: note: include the header <ctype.h> or explicitly provide a declaration for 'isspace'
1 error generated.
make: *** [puma_http11.o] Error 1
make Failed,exit code 2
Gem files will remain installed in /Users/kir/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/puma-4.3.5 for inspection.
Results logged to /Users/kir/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/extensions/x86_64-darwin-19/2.7.0/puma-4.3.5/gem_make.out
An error occurred while installing puma (4.3.5),and Bundler cannot continue.
Make sure that `gem install puma -v '4.3.5' --source 'https://rubygems.org/'` succeeds before bundling.
In Gemfile:
puma
run bundle binstubs bundler
Could not find gem 'sqlite3 (~> 1.4)' in any of the gem sources listed in your Gemfile.
run bundle exec spring binstub --all
bundler: command not found: spring
Install missing gem executables with `bundle install`
rails webpacker:install
Could not find gem 'sqlite3 (~> 1.4)' in any of the gem sources listed in your Gemfile.
Run `bundle install` to install missing gems.
怎么了?我该怎么办?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)