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

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

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

CMS(Content Management System)は複数のユーザーでコンテンツを編集することが可能なWebサイトの管理/構築用のプラットフォームを指します。また、会社単位で運用管理するものはECMと呼びます。

Ruby on Rails

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

Q&A

0回答

2056閲覧

railsのCMSがインストールできない

SeijiNisiwaki

総合スコア10

CMS

CMS(Content Management System)は複数のユーザーでコンテンツを編集することが可能なWebサイトの管理/構築用のプラットフォームを指します。また、会社単位で運用管理するものはECMと呼びます。

Ruby on Rails

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

0グッド

1クリップ

投稿2017/02/10 06:42

###前提・実現したいこと
ruby on railsをつかった Fae というCMSをローカルにインストールして
動作確認をしたいです。

GitHub:
https://github.com/wearefine/fae

rubygems.org:
https://rubygems.org/gems/fae-rails/versions/1.4.1

###発生している問題・エラーメッセージ
railsについてはほとんど知識がないので
GitHubのInstallationにそってインストールを試みましたがうまくいきません

以下手順

  1. Gemfileをhomeディレクトリに作成

※ Dependencies より rails, sass, sass-rails のバージョンも指定した

# C:\Users\myaccount source "https://rubygems.org" gem 'fae-rails' gem 'rails', '~> 4.1.0' gem 'sass-rails', '~> 5.0.0' gem 'sass', '~> 3.4.0'
  1. rails g fae:install を実行するが、コマンドの使い方が表示される
C:\Users\myaccount>rails g fae:install Usage: rails new APP_PATH [options] ... 以下略 ...

その後試行錯誤していますが、いまだに rails g fae:install が実行できない状態です
そもそも手順はあっているのでしょうか?

どなたか教えていただけないでしょうか?
よろしくお願いいたします。

###試したこと

  1. 調べるとアプリ上で実行するようだったのでGitHubよりソースをダウンロードし、アプリのルートディレクトリでコマンドを実行するが以下エラー発生
C:\Users\myaccount\Desktop\fae-master>rails g fae:install Could not find nokogiri-1.6.7.2 in any of the sources Run `bundle install` to install missing gems.
  1. エラーの指示に従い bundle install を実行するがエラー
C:\Users\myaccount\Desktop\fae-master>bundle install Fetching gem metadata from https://rubygems.org/.............. Fetching version metadata from https://rubygems.org/... Fetching dependency metadata from https://rubygems.org/.. Resolving dependencies... Using rake 10.4.2 Using i18n 0.7.0 Using json 1.8.3 ... 中略 ... Using rb-inotify 0.9.5 Using sprockets 3.6.0 Gem::Ext::BuildError: ERROR: Failed to build gem native extension. current directory: C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/eventmachine-1.0.3/ext C:/Ruby23-x64/bin/ruby.exe -r ./siteconf20170210-6532-l2nppi.rb extconf.rb checking for main() in -lssl... *** 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. Provided configuration options: --with-opt-dir ... 中略 ... --with-ssllib --without-ssllib C:/Ruby23-x64/lib/ruby/2.3.0/mkmf.rb:456:in `try_do': The compiler failed to generate an executable file. (RuntimeError) You have to install development tools first. from C:/Ruby23-x64/lib/ruby/2.3.0/mkmf.rb:541:in `try_link0' ... 中略 ... from extconf.rb:61:in `<main>' To see why this extension failed to compile, please check the mkmf.log which can be found here: C:/Ruby23-x64/lib/ruby/gems/2.3.0/extensions/x64-mingw32/2.3.0/eventmachine-1.0.3/mkmf.log extconf failed, exit code 1 Gem files will remain installed in C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/eventmachine-1.0.3 for inspection. Results logged to
  1. eventmachine-1.0.3 のインストール時のエラーのようなので指示に従い mkmf.log を確認する
package configuration for openssl is not found "x86_64-w64-mingw32-gcc -o conftest.exe -IC:/Ruby23-x64/include/ruby-2.3.0/x64-mingw32 -IC:/Ruby23-x64/include/ruby-2.3.0/ruby/backward -IC:/Ruby23-x64/include/ruby-2 .3.0 -I. -DFD_SETSIZE=2048 -D_WIN32_WINNT=0x0501 -D__MINGW_USE_VC2005_COMPAT -D_FILE_OFFSET_BITS=64 -O3 -fno-omit-frame-pointer -fno-fast-math -g -Wall -Wextra -Wno -unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wim plicit-function-declaration -Wdeprecated-declarations -Wno-packed-bitfield-compat conftest.c -L. -LC:/Ruby23-x64/lib -L. -lx64-msvcrt-ruby230 -lshell32 -lws2_3 2 -liphlpapi -limagehlp -lshlwapi " checked program was: /* begin */ 1: #include "ruby.h" 2: 3: #include <winsock2.h> 4: #include <windows.h> 5: int main(int argc, char **argv) 6: { 7: return 0; 8: } /* end */
  1. openssl がみつからないと書いてあるのでインストールして再実行するもエラー

※opensslは以下サイトより Win64 OpenSSL v1.0.2k Light をインストール
http://slproweb.com/products/Win32OpenSSL.html
※インストール手順は以下サイトを参考
http://www.atmarkit.co.jp/ait/articles/1601/29/news043.html

C:\Users\myaccount\Desktop\fae-master>bundle install Fetching gem metadata from https://rubygems.org/.......... Fetching version metadata from https://rubygems.org/.. Fetching dependency metadata from https://rubygems.org/. Resolving dependencies... Bundler could not find compatible versions for gem "ruby": In Gemfile: ruby x64-mingw32 ruby capybara-webkit (~> 1.8) x64-mingw32 was resolved to 1.8.0, which depends on capybara (< 2.7.0, >= 2.3.0) x64-mingw32 was resolved to 2.4.4, which depends on nokogiri (>= 1.3.3) x64-mingw32 was resolved to 1.6.7.2, which depends on ruby (< 2.3) x64-mingw32 Could not find gem 'ruby (< 2.3) x64-mingw32', which is required by gem 'nokogiri (>= 1.3.3) x64-mingw32', in any of the sources.
  1. rubyのバージョンを2.3未満に変更して同手順を試みるが 2) の bundle installと同じくeventmachine でエラー

※ ruby 2.2.6p396 (2016-11-15 revision 56800) [x64-mingw32] に変更

package configuration for openssl is not found have_library: checking for main() in -lssl... -------------------- no "x86_64-w64-mingw32-gcc -o conftest.exe -IC:/Ruby22-x64/include/ruby-2.2.0/x64-mingw32 -IC:/Ruby22-x64/include/ruby-2.2.0/ruby/backward -IC:/Ruby22-x64/include/ruby-2 .2.0 -I. -DFD_SETSIZE=2048 -D_WIN32_WINNT=0x0501 -D__MINGW_USE_VC2005_COMPAT -D_FILE_OFFSET_BITS=64 -O3 -fno-omit-frame-pointer -fno-fast-math -g -Wall -Wextra -Wno -unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wim plicit-function-declaration -Wdeprecated-declarations -Wno-packed-bitfield-compat conftest.c -L. -LC:/Ruby22-x64/lib -L. -lx64-msvcrt-ruby220 -lshell32 -lws2_3 2 -liphlpapi -limagehlp -lshlwapi " checked program was: /* begin */ 1: #include "ruby.h" 2: 3: #include <winsock2.h> 4: #include <windows.h> 5: int main(int argc, char **argv) 6: { 7: return 0; 8: } /* end */ "x86_64-w64-mingw32-gcc -o conftest.exe -IC:/Ruby22-x64/include/ruby-2.2.0/x64-mingw32 -IC:/Ruby22-x64/include/ruby-2.2.0/ruby/backward -IC:/Ruby22-x64/include/ruby-2 .2.0 -I. -DFD_SETSIZE=2048 -D_WIN32_WINNT=0x0501 -D__MINGW_USE_VC2005_COMPAT -D_FILE_OFFSET_BITS=64 -O3 -fno-omit-frame-pointer -fno-fast-math -g -Wall -Wextra -Wno -unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wim plicit-function-declaration -Wdeprecated-declarations -Wno-packed-bitfield-compat conftest.c -L. -LC:/Ruby22-x64/lib -L. -lx64-msvcrt-ruby220 -lssl -lshell32 - lws2_32 -liphlpapi -limagehlp -lshlwapi " conftest.c: In function 't':^M conftest.c:16:32: warning: variable 'p' set but not used [-Wunused-but-set-variable]^M c:/devkit/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.2/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lssl^M collect2.exe: error: ld returned 1 exit status^M checked program was: /* begin */ 1: #include "ruby.h" 2: 3: #include <winsock2.h> 4: #include <windows.h> 5: 6: /*top*/ 7: extern int t(void); 8: int main(int argc, char **argv) 9: { 10: if (argc > 1000000) { 11: printf("%p", &t); 12: } 13: 14: return 0; 15: } 16: int t(void) { void ((*volatile p)()); p = (void ((*)()))main; return 0; } /* end */ "x86_64-w64-mingw32-gcc -o conftest.exe -IC:/Ruby22-x64/include/ruby-2.2.0/x64-mingw32 -IC:/Ruby22-x64/include/ruby-2.2.0/ruby/backward -IC:/Ruby22-x64/include/ruby-2 .2.0 -I. -DFD_SETSIZE=2048 -D_WIN32_WINNT=0x0501 -D__MINGW_USE_VC2005_COMPAT -D_FILE_OFFSET_BITS=64 -O3 -fno-omit-frame-pointer -fno-fast-math -g -Wall -Wextra -Wno -unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wim plicit-function-declaration -Wdeprecated-declarations -Wno-packed-bitfield-compat conftest.c -L. -LC:/Ruby22-x64/lib -L. -lx64-msvcrt-ruby220 -lssl -lshell32 - lws2_32 -liphlpapi -limagehlp -lshlwapi " conftest.c: In function 't':^M conftest.c:16:1: error: too few arguments to function 'main'^M conftest.c:8:5: note: declared here^M checked program was: /* begin */ 1: #include "ruby.h" 2: 3: #include <winsock2.h> 4: #include <windows.h> 5: 6: /*top*/ 7: extern int t(void);
  1. 行き詰る...

GitHubを参考に Win64 OpenSSL v1.0.2k Light から Win32 OpenSSL v1.0.2k に変更
※ インストール先を C:\OpenSSL-Win32 とする
書いてあるとおり rake コマンドを実行するがエラー
無いといわれるパッケージをひたすらinstallするが次々にでてきて終わらない...
そもそもこれでいいのかすらわからない状態...

###補足情報(言語/FW/ツール等のバージョンなど)
環境:
windows7 64bit
ruby 2.3.0p0 (2015-12-25 revision 53290) [x64-mingw32] <- RubyInstallerで入れました
Bundler version 1.14.3

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

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

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

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

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

guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

まだ回答がついていません

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

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

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

ただいまの回答率
85.50%

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

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

質問する

関連した質問