質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
Ruby

Rubyはプログラミング言語のひとつで、オープンソース、オブジェクト指向のプログラミング開発に対応しています。

Webサーバー

Webサーバーとは、HTTPリクエストに応じて、クライアントに情報を提供するシステムです。

Ruby on Rails

Ruby on Railsは、オープンソースのWebアプリケーションフレームワークです。「同じことを繰り返さない」というRailsの基本理念のもと、他のフレームワークより少ないコードで簡単に開発できるよう設計されています。

Windows Server

Windows Serverとは、Microsoft社のサーバ用オペレーティングシステムの総称です。 企業内ネットワークなどで利用されるサーバ機へ導入することを想定して開発されているため高い安定性があり、 管理機能を提供するソフトウェアが多く含まれています。

Q&A

2回答

841閲覧

railsサーバーが起動しない

isoyu

総合スコア4

Ruby

Rubyはプログラミング言語のひとつで、オープンソース、オブジェクト指向のプログラミング開発に対応しています。

Webサーバー

Webサーバーとは、HTTPリクエストに応じて、クライアントに情報を提供するシステムです。

Ruby on Rails

Ruby on Railsは、オープンソースのWebアプリケーションフレームワークです。「同じことを繰り返さない」というRailsの基本理念のもと、他のフレームワークより少ないコードで簡単に開発できるよう設計されています。

Windows Server

Windows Serverとは、Microsoft社のサーバ用オペレーティングシステムの総称です。 企業内ネットワークなどで利用されるサーバ機へ導入することを想定して開発されているため高い安定性があり、 管理機能を提供するソフトウェアが多く含まれています。

0グッド

0クリップ

投稿2020/01/28 12:48

編集2020/01/29 01:16

前提・実現したいこと

ProgateでRuby on Railsの開発環境を構築していた時のことです。
rails new sample_app
cd sample_app 
rails s 
を実行後

発生している問題・エラーメッセージ

Usage: rails new APP_PATH [options] Options: [--skip-namespace], [--no-skip-namespace] # Skip namespace (affects only isolated applications) -r, [--ruby=PATH] # Path to the Ruby binary of your choice # Default: C:/Ruby25-x64/bin/ruby.exe -m, [--template=TEMPLATE] # Path to some application template (can be a filesystem path or URL) -d, [--database=DATABASE] # Preconfigure for selected database (options: mysql/postgresql/sqlite3/oracle/frontbase/ibm_db/sqlserver/jdbcmysql/jdbcsqlite3/jdbcpostgresql/jdbc) # Default: sqlite3 [--skip-yarn], [--no-skip-yarn] # Don't use Yarn for managing JavaScript dependencies [--skip-gemfile], [--no-skip-gemfile] # Don't create a Gemfile -G, [--skip-git], [--no-skip-git] # Skip .gitignore file [--skip-keeps], [--no-skip-keeps] # Skip source control .keep files -M, [--skip-action-mailer], [--no-skip-action-mailer] # Skip Action Mailer files -O, [--skip-active-record], [--no-skip-active-record] # Skip Active Record files [--skip-active-storage], [--no-skip-active-storage] # Skip Active Storage files -P, [--skip-puma], [--no-skip-puma] # Skip Puma related files -C, [--skip-action-cable], [--no-skip-action-cable] # Skip Action Cable files -S, [--skip-sprockets], [--no-skip-sprockets] # Skip Sprockets files [--skip-spring], [--no-skip-spring] # Don't install Spring application preloader [--skip-listen], [--no-skip-listen] # Don't generate configuration that depends on the listen gem [--skip-coffee], [--no-skip-coffee] # Don't use CoffeeScript -J, [--skip-javascript], [--no-skip-javascript] # Skip JavaScript files [--skip-turbolinks], [--no-skip-turbolinks] # Skip turbolinks gem -T, [--skip-test], [--no-skip-test] # Skip test files [--skip-system-test], [--no-skip-system-test] # Skip system test files [--skip-bootsnap], [--no-skip-bootsnap] # Skip bootsnap gem [--dev], [--no-dev] # Setup the application with Gemfile pointing to your Rails checkout [--edge], [--no-edge] # Setup the application with Gemfile pointing to Rails repository [--rc=RC] # Path to file containing extra configuration options for rails command [--no-rc], [--no-no-rc] # Skip loading of extra configuration options from .railsrc file [--api], [--no-api] # Preconfigure smaller stack for API only apps -B, [--skip-bundle], [--no-skip-bundle] # Don't run bundle install [--webpack=WEBPACK] # Preconfigure for app-like JavaScript with Webpack (options: react/vue/angular/elm/stimulus) Runtime options: -f, [--force] # Overwrite files that already exist -p, [--pretend], [--no-pretend] # Run but do not make any changes -q, [--quiet], [--no-quiet] # Suppress status output -s, [--skip], [--no-skip] # Skip files that already exist Rails options: -h, [--help], [--no-help] # Show this help message and quit -v, [--version], [--no-version] # Show Rails version number and quit Description: The 'rails new' command creates a new Rails application with a default directory structure and configuration at the path you specify. You can specify extra command-line arguments to be used every time 'rails new' runs in the .railsrc configuration file in your home directory. Note that the arguments specified in the .railsrc file don't affect the defaults values shown above in this help message. Example: rails new ~/Code/Ruby/weblog This generates a skeletal Rails installation in ~/Code/Ruby/weblog.

該当のソースコード

rails s

試したこと

他の同じようなところで詰まっている方の解決方法を試してみたのですが、どれもうまくいきませんでした。

補足情報(FW/ツールのバージョンなど)

windows
ruby 2.5.1p57 (2018-03-29 revision 63029) [x64-mingw32]
Rails 5.2.4.1

初心者なもので、どなたかご教授お願いします。

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

kazto

2020/01/28 13:25

rails new sample_app を実施したときのログを追記してください。おそらく失敗しているはずです。
isoyu

2020/01/28 13:50

コメントありがとうございます。 create create README.md create Rakefile create .ruby-version create config.ru create .gitignore create Gemfile run git init from "." と表示されました
kazto

2020/01/29 08:30

bundlerはインストールされていますでしょうか。また、バージョンはいくつでしょうか。
isoyu

2020/01/29 11:35

bundler -v と入力したところ、 Bundler version 2.1.4 と表示されました。
guest

回答2

0

状況としては、sqlite3のnative extensionの構築に失敗しています。

まずは、

gem install sqlite3

が成功するようにする必要があります。

gemのversionの問題か、OSにライブラリが足りていないかのどちらかです。

こちらにある内容が参考になると思います。
https://qiita.com/jun_moka/items/a83a8149bc97cedc16b5

投稿2020/02/16 08:58

編集2020/02/16 08:59
matsubokkuri

総合スコア744

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

isoyu

2020/02/16 09:35

・・・省略 Building native extensions with: '--with-sqlite3-include=C:/sqlite-amalgamation-3230100 --with-sqlite3-lib=C:\Ruby25-x64\bin' This could take a while... Successfully installed sqlite3-1.4.2 Parsing documentation for sqlite3-1.4.2 Installing ri documentation for sqlite3-1.4.2 Done installing documentation for sqlite3 after 6 seconds 1 gem installed となりました。これは成功しているのでしょうか?
guest

0

cd sample_app をしたとのことですが、アプリ名の下で実行していないのではないでしょうか。
例えばひとつ上の階層で実行すると、同じような画面表示になります。

投稿2020/02/10 05:47

makox0105

総合スコア65

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

isoyu

2020/02/10 13:18

C:\Users\ユーザ名\sample_app>rails s となっているのでアプリ名の下で実行できていると思います。
makox0105

2020/02/11 09:51

bundle install って実行できますか?
isoyu

2020/02/13 05:18

実行できました。
makox0105

2020/02/13 09:04

もう1回rails sでも同じでしょうか?
isoyu

2020/02/13 09:10

そうですね、まったく同じエラーが出てしまいます。
makox0105

2020/02/13 09:29

bundle install のログを見せてください。
isoyu

2020/02/13 10:24

Fetching gem metadata from https://rubygems.org/............. Fetching gem metadata from https://rubygems.org/. Resolving dependencies...NOTE: Gem::Specification#rubyforge_project= is deprecated with no replacement. It will be removed on or after 2019-12-01. Gem::Specification#rubyforge_project= called from C:/Ruby25-x64/lib/ruby/gems/2.5.0/specifications/coffee-rails-4.2.2.gemspec:16. ..NOTE: Gem::Specification#rubyforge_project= is deprecated with no replacement. It will be removed on or after 2019-12-01. Gem::Specification#rubyforge_project= called from C:/Ruby25-x64/lib/ruby/gems/2.5.0/specifications/sass-3.7.4.gemspec:21. .NOTE: Gem::Specification#rubyforge_project= is deprecated with no replacement. It will be removed on or after 2019-12-01. Gem::Specification#rubyforge_project= called from C:/Ruby25-x64/lib/ruby/gems/2.5.0/specifications/sprockets-3.7.2.gemspec:19. NOTE: Gem::Specification#rubyforge_project= is deprecated with no replacement. It will be removed on or after 2019-12-01. Gem::Specification#rubyforge_project= called from C:/Ruby25-x64/lib/ruby/gems/2.5.0/specifications/archive-zip-0.12.0.gemspec:16. .NOTE: Gem::Specification#rubyforge_project= is deprecated with no replacement. It will be removed on or after 2019-12-01. Gem::Specification#rubyforge_project= called from C:/Ruby25-x64/lib/ruby/gems/2.5.0/specifications/io-like-0.3.0.gemspec:19. NOTE: Gem::Specification#rubyforge_project= is deprecated with no replacement. It will be removed on or after 2019-12-01. Gem::Specification#rubyforge_project= called from C:/Ruby25-x64/lib/ruby/gems/2.5.0/specifications/coffee-script-source-1.12.2.gemspec:16. Using rake 13.0.1 Using concurrent-ruby 1.1.6 Using i18n 1.8.2 Using minitest 5.14.0 Using thread_safe 0.3.6 Using tzinfo 1.2.6 Using activesupport 5.2.4.1 Using builder 3.2.4 Using erubi 1.9.0 Using mini_portile2 2.4.0 Using nokogiri 1.10.8 (x64-mingw32) Using rails-dom-testing 2.0.3 Using crass 1.0.6 Using loofah 2.4.0 Using rails-html-sanitizer 1.3.0 Using actionview 5.2.4.1 Using rack 2.2.2 Using rack-test 1.1.0 Using actionpack 5.2.4.1 Using nio4r 2.5.2 Using websocket-extensions 0.1.4 Using websocket-driver 0.7.1 Using actioncable 5.2.4.1 Using globalid 0.4.2 Using activejob 5.2.4.1 Using mini_mime 1.0.2 Using mail 2.7.1 Using actionmailer 5.2.4.1 Using activemodel 5.2.4.1 Using arel 9.0.0 Using activerecord 5.2.4.1 Using mimemagic 0.3.4 Using marcel 0.3.3 Using activestorage 5.2.4.1 Using public_suffix 4.0.3 Using addressable 2.7.0 Using io-like 0.3.1 Using archive-zip 0.12.0 Using bindex 0.8.1 Using msgpack 1.3.3 (x64-mingw32) Using bootsnap 1.4.5 Using bundler 2.1.4 Using byebug 11.1.1 Using regexp_parser 1.6.0 Using xpath 3.2.0 Using capybara 3.31.0 Using childprocess 3.0.0 Using chromedriver-helper 2.1.1 Using coffee-script-source 1.12.2 Using execjs 2.7.0 Using coffee-script 2.4.1 Using method_source 0.9.2 Using thor 1.0.1 Using railties 5.2.4.1 Using coffee-rails 4.2.2 Using duktape 2.3.0.0 Using ffi 1.12.2 (x64-mingw32) Using jbuilder 2.10.0 Using puma 3.12.2 Using sprockets 3.7.2 Using sprockets-rails 3.2.1 Using rails 5.2.4.1 Using rb-fsevent 0.10.3 Using rb-inotify 0.10.1 Using rubyzip 2.2.0 Using sass-listen 4.0.0 Using sass 3.7.4 Using tilt 2.0.10 Using sass-rails 5.1.0 Using selenium-webdriver 3.142.7 Fetching sqlite3 1.4.2 Installing sqlite3 1.4.2 with native extensions Gem::Ext::BuildError: ERROR: Failed to build gem native extension. current directory: C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/sqlite3-1.4.2/ext/sqlite3 C:/Ruby25-x64/bin/ruby.exe -I C:/Ruby25-x64/lib/ruby/site_ruby/2.5.0 -r ./siteconf20200213-12776-1g3r9ca.rb extconf.rb checking for sqlite3.h... yes checking for pthread_create() in -lpthread... yes checking for -ldl... no checking for sqlite3_libversion_number() in -lsqlite3... yes checking for rb_proc_arity()... yes checking for rb_integer_pack()... yes checking for sqlite3_initialize()... yes checking for sqlite3_backup_init()... yes checking for sqlite3_column_database_name()... yes checking for sqlite3_enable_load_extension()... no checking for sqlite3_load_extension()... no checking for sqlite3_open_v2()... yes checking for sqlite3_prepare_v2()... yes checking for sqlite3_int64 in sqlite3.h... yes checking for sqlite3_uint64 in sqlite3.h... yes creating Makefile current directory: C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/sqlite3-1.4.2/ext/sqlite3 make "DESTDIR=" clean current directory: C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/sqlite3-1.4.2/ext/sqlite3 make "DESTDIR=" generating sqlite3_native-x64-mingw32.def compiling aggregator.c compiling backup.c compiling database.c database.c: In function 'exec_batch': database.c:726:57: warning: passing argument 3 of 'sqlite3_exec' from incompatible pointer type [-Wincompatible-pointer-types] 726 | status = sqlite3_exec(ctx->db, StringValuePtr(sql), hash_callback_function, callback_ary, &errMsg); | ^~~~~~~~~~~~~~~~~~~~~~ | | | int (*)(VALUE, int, char **, char **) {aka int (*)(long long unsigned int, int, char **, char **)} In file included from ./sqlite3_ruby.h:25, from database.c:1: C:/msys64/mingw64/include/sqlite3.h:409:9: note: expected 'int (*)(void *, int, char **, char **)' but argument is of type 'int (*)(VALUE, int, char **, char **)' {aka 'int (*)(long long unsigned int, int, char **, char **)'} 409 | int (*callback)(void*,int,char**,char**), /* Callback function */ | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ database.c:726:81: warning: passing argument 4 of 'sqlite3_exec' makes pointer from integer without a cast [-Wint-conversion] 726 | status = sqlite3_exec(ctx->db, StringValuePtr(sql), hash_callback_function, callback_ary, &errMsg); | ^~~~~~~~~~~~ | | | VALUE {aka long long unsigned int} In file included from ./sqlite3_ruby.h:25, from database.c:1: C:/msys64/mingw64/include/sqlite3.h:410:3: note: expected 'void *' but argument is of type 'VALUE' {aka 'long long unsigned int'} 410 | void *, /* 1st argument to callback */ | ^~~~~~ database.c:728:57: warning: passing argument 3 of 'sqlite3_exec' from incompatible pointer type [-Wincompatible-pointer-types] 728 | status = sqlite3_exec(ctx->db, StringValuePtr(sql), regular_callback_function, callback_ary, &errMsg); | ^~~~~~~~~~~~~~~~~~~~~~~~~ | | | int (*)(VALUE, int, char **, char **) {aka int (*)(long long unsigned int, int, char **, char **)} In file included from ./sqlite3_ruby.h:25, from database.c:1: C:/msys64/mingw64/include/sqlite3.h:409:9: note: expected 'int (*)(void *, int, char **, char **)' but argument is of type 'int (*)(VALUE, int, char **, char **)' {aka 'int (*)(long long unsigned int, int, char **, char **)'} 409 | int (*callback)(void*,int,char**,char**), /* Callback function */ | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ database.c:728:84: warning: passing argument 4 of 'sqlite3_exec' makes pointer from integer without a cast [-Wint-conversion] 728 | status = sqlite3_exec(ctx->db, StringValuePtr(sql), regular_callback_function, callback_ary, &errMsg); | ^~~~~~~~~~~~ | | | VALUE {aka long long unsigned int} In file included from ./sqlite3_ruby.h:25, from database.c:1: C:/msys64/mingw64/include/sqlite3.h:410:3: note: expected 'void *' but argument is of type 'VALUE' {aka 'long long unsigned int'} 410 | void *, /* 1st argument to callback */ | ^~~~~~ compiling exception.c compiling sqlite3.c compiling statement.c linking shared-object sqlite3/sqlite3_native.so C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: database.o:database.c:(.text+0x656): undefined reference to `sqlite3_trace' collect2.exe: error: ld returned 1 exit status make: *** [Makefile:259: sqlite3_native.so] 繧ィ繝ゥ繝シ 1 make failed, exit code 2 Gem files will remain installed in C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/sqlite3-1.4.2 for inspection. Results logged to C:/Ruby25-x64/lib/ruby/gems/2.5.0/extensions/x64-mingw32/2.5.0/sqlite3-1.4.2/gem_make.out An error occurred while installing sqlite3 (1.4.2), and Bundler cannot continue. Make sure that `gem install sqlite3 -v '1.4.2' --source 'https://rubygems.org/'` succeeds before bundling. In Gemfile: sqlite3
makox0105

2020/02/13 14:33

うーん、なんかおかしいですね。sqlite3の問題があるようですが、それ以前にGemfileにも問題があるような気もします。 明確な返答ができず申し訳ありません。
siruku6

2020/02/13 15:22

An error occurred while installing sqlite3 (1.4.2), and Bundler cannot continue. Make sure that `gem install sqlite3 -v '1.4.2' --source 'https://rubygems.org/'` succeeds before bundling. というメッセージが出ているようですが、この通りに実行するとどのようになりましたか?
isoyu

2020/02/16 08:24

このような表示がでました。 NOTE: Gem::Specification#rubyforge_project= is deprecated with no replacement. It will be removed on or after 2019-12-01. Gem::Specification#rubyforge_project= called from C:/Ruby25-x64/lib/ruby/gems/2.5.0/specifications/archive-zip-0.12.0.gemspec:16. NOTE: Gem::Specification#rubyforge_project= is deprecated with no replacement. It will be removed on or after 2019-12-01. Gem::Specification#rubyforge_project= called from C:/Ruby25-x64/lib/ruby/gems/2.5.0/specifications/coffee-rails-4.2.2.gemspec:16. NOTE: Gem::Specification#rubyforge_project= is deprecated with no replacement. It will be removed on or after 2019-12-01. Gem::Specification#rubyforge_project= called from C:/Ruby25-x64/lib/ruby/gems/2.5.0/specifications/coffee-script-source-1.12.2.gemspec:16. NOTE: Gem::Specification#rubyforge_project= is deprecated with no replacement. It will be removed on or after 2019-12-01. Gem::Specification#rubyforge_project= called from C:/Ruby25-x64/lib/ruby/gems/2.5.0/specifications/io-like-0.3.0.gemspec:19. NOTE: Gem::Specification#rubyforge_project= is deprecated with no replacement. It will be removed on or after 2019-12-01. Gem::Specification#rubyforge_project= called from C:/Ruby25-x64/lib/ruby/gems/2.5.0/specifications/sass-3.7.4.gemspec:21. NOTE: Gem::Specification#rubyforge_project= is deprecated with no replacement. It will be removed on or after 2019-12-01. Gem::Specification#rubyforge_project= called from C:/Ruby25-x64/lib/ruby/gems/2.5.0/specifications/sprockets-3.7.2.gemspec:19. NOTE: Gem::Specification#rubyforge_project= is deprecated with no replacement. It will be removed on or after 2019-12-01. Gem::Specification#rubyforge_project= called from C:/Ruby25-x64/lib/ruby/gems/2.5.0/specifications/archive-zip-0.12.0.gemspec:16. NOTE: Gem::Specification#rubyforge_project= is deprecated with no replacement. It will be removed on or after 2019-12-01. Gem::Specification#rubyforge_project= called from C:/Ruby25-x64/lib/ruby/gems/2.5.0/specifications/coffee-rails-4.2.2.gemspec:16. NOTE: Gem::Specification#rubyforge_project= is deprecated with no replacement. It will be removed on or after 2019-12-01. Gem::Specification#rubyforge_project= called from C:/Ruby25-x64/lib/ruby/gems/2.5.0/specifications/coffee-script-source-1.12.2.gemspec:16. NOTE: Gem::Specification#rubyforge_project= is deprecated with no replacement. It will be removed on or after 2019-12-01. Gem::Specification#rubyforge_project= called from C:/Ruby25-x64/lib/ruby/gems/2.5.0/specifications/io-like-0.3.0.gemspec:19. NOTE: Gem::Specification#rubyforge_project= is deprecated with no replacement. It will be removed on or after 2019-12-01. Gem::Specification#rubyforge_project= called from C:/Ruby25-x64/lib/ruby/gems/2.5.0/specifications/sass-3.7.4.gemspec:21. NOTE: Gem::Specification#rubyforge_project= is deprecated with no replacement. It will be removed on or after 2019-12-01. Gem::Specification#rubyforge_project= called from C:/Ruby25-x64/lib/ruby/gems/2.5.0/specifications/sprockets-3.7.2.gemspec:19. Temporarily enhancing PATH for MSYS/MINGW... Installing required msys2 packages: mingw-w64-x86_64-sqlite3 警告: mingw-w64-x86_64-sqlite3-3.30.0-1 は最新です -- スキップ Building native extensions. This could take a while... ERROR: Error installing sqlite3: ERROR: Failed to build gem native extension. current directory: C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/sqlite3-1.4.2/ext/sqlite3 C:/Ruby25-x64/bin/ruby.exe -I C:/Ruby25-x64/lib/ruby/site_ruby/2.5.0 -r ./siteconf20200216-6508-ywr61u.rb extconf.rb checking for sqlite3.h... yes checking for pthread_create() in -lpthread... yes checking for -ldl... no checking for sqlite3_libversion_number() in -lsqlite3... yes checking for rb_proc_arity()... yes checking for rb_integer_pack()... yes checking for sqlite3_initialize()... yes checking for sqlite3_backup_init()... yes checking for sqlite3_column_database_name()... yes checking for sqlite3_enable_load_extension()... no checking for sqlite3_load_extension()... no checking for sqlite3_open_v2()... yes checking for sqlite3_prepare_v2()... yes checking for sqlite3_int64 in sqlite3.h... yes checking for sqlite3_uint64 in sqlite3.h... yes creating Makefile current directory: C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/sqlite3-1.4.2/ext/sqlite3 make "DESTDIR=" clean current directory: C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/sqlite3-1.4.2/ext/sqlite3 make "DESTDIR=" generating sqlite3_native-x64-mingw32.def compiling aggregator.c compiling backup.c compiling database.c database.c: In function 'exec_batch': database.c:726:57: warning: passing argument 3 of 'sqlite3_exec' from incompatible pointer type [-Wincompatible-pointer-types] 726 | status = sqlite3_exec(ctx->db, StringValuePtr(sql), hash_callback_function, callback_ary, &errMsg); | ^~~~~~~~~~~~~~~~~~~~~~ | | | int (*)(VALUE, int, char **, char **) {aka int (*)(long long unsigned int, int, char **, char **)} In file included from ./sqlite3_ruby.h:25, from database.c:1: C:/msys64/mingw64/include/sqlite3.h:409:9: note: expected 'int (*)(void *, int, char **, char **)' but argument is of type 'int (*)(VALUE, int, char **, char **)' {aka 'int (*)(long long unsigned int, int, char **, char **)'} 409 | int (*callback)(void*,int,char**,char**), /* Callback function */ | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ database.c:726:81: warning: passing argument 4 of 'sqlite3_exec' makes pointer from integer without a cast [-Wint-conversion] 726 | status = sqlite3_exec(ctx->db, StringValuePtr(sql), hash_callback_function, callback_ary, &errMsg); | ^~~~~~~~~~~~ | | | VALUE {aka long long unsigned int} In file included from ./sqlite3_ruby.h:25, from database.c:1: C:/msys64/mingw64/include/sqlite3.h:410:3: note: expected 'void *' but argument is of type 'VALUE' {aka 'long long unsigned int'} 410 | void *, /* 1st argument to callback */ | ^~~~~~ database.c:728:57: warning: passing argument 3 of 'sqlite3_exec' from incompatible pointer type [-Wincompatible-pointer-types] 728 | status = sqlite3_exec(ctx->db, StringValuePtr(sql), regular_callback_function, callback_ary, &errMsg); | ^~~~~~~~~~~~~~~~~~~~~~~~~ | | | int (*)(VALUE, int, char **, char **) {aka int (*)(long long unsigned int, int, char **, char **)} In file included from ./sqlite3_ruby.h:25, from database.c:1: C:/msys64/mingw64/include/sqlite3.h:409:9: note: expected 'int (*)(void *, int, char **, char **)' but argument is of type 'int (*)(VALUE, int, char **, char **)' {aka 'int (*)(long long unsigned int, int, char **, char **)'} 409 | int (*callback)(void*,int,char**,char**), /* Callback function */ | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ database.c:728:84: warning: passing argument 4 of 'sqlite3_exec' makes pointer from integer without a cast [-Wint-conversion] 728 | status = sqlite3_exec(ctx->db, StringValuePtr(sql), regular_callback_function, callback_ary, &errMsg); | ^~~~~~~~~~~~ | | | VALUE {aka long long unsigned int} In file included from ./sqlite3_ruby.h:25, from database.c:1: C:/msys64/mingw64/include/sqlite3.h:410:3: note: expected 'void *' but argument is of type 'VALUE' {aka 'long long unsigned int'} 410 | void *, /* 1st argument to callback */ | ^~~~~~ compiling exception.c compiling sqlite3.c compiling statement.c linking shared-object sqlite3/sqlite3_native.so C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: database.o:database.c:(.text+0x656): undefined reference to `sqlite3_trace' collect2.exe: error: ld returned 1 exit status make: *** [Makefile:259: sqlite3_native.so] 繧ィ繝ゥ繝シ 1 make failed, exit code 2 Gem files will remain installed in C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/sqlite3-1.4.2 for inspection. Results logged to C:/Ruby25-x64/lib/ruby/gems/2.5.0/extensions/x64-mingw32/2.5.0/sqlite3-1.4.2/gem_make.out
makox0105

2020/02/19 07:53 編集

試しにsqlite3のバージョンを1.3.13にしてみてください。 gem uninstall sqlite3 gem install sqlite3 -v 1.3.13
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

まだベストアンサーが選ばれていません

会員登録して回答してみよう

アカウントをお持ちの方は

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問