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

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

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

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

Q&A

解決済

1回答

2540閲覧

rails serverが起動しない

Shuno

総合スコア5

Ruby on Rails

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

0グッド

0クリップ

投稿2021/06/06 04:46

前提・実現したいこと

rails serverを起動させたいです。

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

rails sコマンドを実行すると下記のエラーが発生します。

/Users/user_name/project_name/vendor/bundle/ruby/2.5.0/gems/ffi-1.15.1/lib/ffi/library.rb:145:in `block in ffi_lib' : Could not open library '/Users/user_name/project_name/vendor/bundle/ruby/2.5.0/gems/sassc-2.4.0/ext/libsass.bundle' : dlopen(/Users/user_name/project_name/vendor/bundle/ruby/2.5.0/gems/sassc-2.4.0/ext/libsass.bundle, 5): image not found (LoadError)

該当のソースコード

Gemfile

1source 'https://rubygems.org' 2git_source(:github) { |repo| "https://github.com/#{repo}.git" } 3 4ruby '2.5.7' 5 6# Bundle edge Rails instead: gem 'rails', github: 'rails/rails' 7gem 'rails', '5.2.3' 8# Use Puma as the app server 9gem 'puma', '~> 3.11' 10# Use SCSS for stylesheets 11gem 'sass-rails', '~> 6.0' 12# Use Uglifier as compressor for JavaScript assets 13gem 'uglifier', '>= 1.3.0' 14# See https://github.com/rails/execjs#readme for more supported runtimes 15# gem 'mini_racer', platforms: :ruby 16 17# Use CoffeeScript for .coffee assets and views 18gem 'coffee-rails', '~> 4.2' 19# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks 20gem 'turbolinks', '~> 5' 21# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder 22gem 'jbuilder', '~> 2.5' 23# Use Redis adapter to run Action Cable in production 24# gem 'redis', '~> 4.0' 25# Use ActiveModel has_secure_password 26gem 'bcrypt' 27gem 'jquery-rails', '4.3.1' 28# Use ActiveStorage variant 29# gem 'mini_magick', '~> 4.8' 30 31# Use Capistrano for deployment 32# gem 'capistrano-rails', group: :development 33 34# Reduces boot times through caching; required in config/boot.rb 35gem 'bootsnap', '>= 1.1.0', require: false 36 37gem 'faker' 38 39gem 'will_paginate', '3.1.7' 40 41gem 'bootstrap-will_paginate', '1.0.0' 42 43gem 'carrierwave', '1.2.2' 44gem 'mini_magick', '>= 4.9.4' 45 46group :development, :test do 47 # Call 'byebug' anywhere in the code to stop execution and get a debugger console 48 gem 'byebug', platforms: [:mri, :mingw, :x64_mingw] 49 gem 'pg' 50 gem 'rspec-rails', '~> 4.0.0.beta2' 51 gem 'rails-controller-testing' 52 gem 'rubocop-airbnb' 53 gem 'factory_bot_rails', '~> 4.10.0' 54end 55 56group :development do 57 # Access an interactive console on exception pages or by calling 'console' anywhere in the code. 58 gem 'web-console', '>= 3.3.0' 59 gem 'listen', '>= 3.0.5', '< 3.2' 60 # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring 61 gem 'spring' 62 gem 'spring-watcher-listen', '~> 2.0.0' 63 gem 'spring-commands-rspec' 64end 65 66group :test do 67 # Adds support for Capybara system testing and selenium driver 68 gem 'capybara', '>= 2.15' 69 gem 'selenium-webdriver' 70 # Easy installation and use of chromedriver to run system tests with Chrome 71 gem 'chromedriver-helper' 72 gem 'webdrivers' 73end 74 75group :production do 76 gem 'pg' 77 gem 'fog', '1.42' 78end 79 80# Windows does not include zoneinfo files, so bundle the tzinfo-data gem 81gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby] 82 83gem 'devise' 84 85gem 'bootstrap-sass' 86

Gemfile.lock

sass-rails (6.0.0) sassc-rails (~> 2.1, >= 2.1.1) sassc (2.4.0) ffi (~> 1.9) sassc-rails (2.1.2) railties (>= 4.0.0) sassc (>= 2.0) sprockets (> 3.0) sprockets-rails tilt

試したこと

下記2つのページを参考に、対処しましたがエラーに変わりありませんでした。

リンク

リンク

※この質問でコードが必要なのかわからず冗長になると良くないと思いエラー文しか載せていないので必要な箇所があれば載せますのでよろしくお願いします。

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

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

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

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

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

guest

回答1

0

ベストアンサー

2021年4月5日に公開されたRuby 2.5.9をもってRuby 2.5系列の公式サポートは終了しています。
関連のGemもサポートされなくなっている可能性があります。
せめて2.6系にしましょう。

~ $ rbenv install -l 2.6.7 2.7.3 3.0.1 jruby-9.2.17.0 mruby-3.0.0 rbx-5.0 truffleruby-21.1.0 truffleruby+graalvm-21.1.0

投稿2021/06/06 05:24

technocore

総合スコア7247

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

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

Shuno

2021/06/06 06:15

早速のご回答ありがとうございます。 Ruby 2.6.5にバージョンを上げたところ 無事にサーバを起動できました。
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

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

ただいまの回答率
85.46%

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

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

質問する

関連した質問