0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Rails6のアプリをgitにあげると動かなくなった件

Last updated at Posted at 2020-04-24

環境

macOS Catalina 10.15.4
ruby 2.6.4p104
Rails 6.0.2.2

状況

簡単に現状回復できる様にと、素のRailsアプリを作成して、自宅のGit鯖に上げたところ、下ろしたアプリが次の様なエラーを返してきた。

% rails s
   .
   .
   .
brary.rb:145:in `block in ffi_lib': Could not open library '/Users/???/Develop/sister2/vendor/bundle/ruby/2.6.0/gems/sassc-2.3.0/ext/libsass.bundle': dlopen(/Users/???/Develop/sister2/vendor/bundle/ruby/2.6.0/gems/sassc-2.3.0/ext/libsass.bundle, 5): image not found (LoadError)

解決

元々Gemの依存関係のエラーが解消しなくて始めたことだったので、また依存関係?何か手順を間違えた?と2,3時間悩んだが、なんのこっちゃない、実際に怒られている/Users/???/Develop/sister2/vendor/bundle/ruby/2.6.0/gems/sassc-2.3.0/ext/libsass.bundleを見に行ったところ、本当になかった。

% ls ./vendor/bundle/ruby/2.6.0/gems/sassc-2.3.0/ext/
depend		extconf.rb	libsass

元のアプリでは

% ls vendor/bundle/ruby/2.6.0/gems/sassc-2.3.0/ext/
Makefile		depend			libsass.bundle
SharedPtr.o		emitter.o		listize.o
ast.o			environment.o		operators.o
   .
   .
   .
constants.o		json.o			util.o
context.o		lexer.o			util_string.o
cssize.o		libsass			values.o

と大量のファイル群があるのに。。
原因を探して見ると、直前の.gitignoreに

% cat vendor/bundle/ruby/2.6.0/gems/sassc-2.3.0/.gitignore
/.bundle/
/.yardoc
/.rvmrc
/Gemfile.lock
/_yardoc/
/coverage/
/doc/
/pkg/
/spec/reports/
/tmp/
*.bundle
*.so
*.o
*.a
*.gem
mkmf.log
vendor/bundle
/ext/Makefile

*.bundle書いてあるやん(;;
これ、消していい物なのか、はたまたコマンドか何かで復活できるのか。。そもそもlibsass.bundleってなんのファイル??
未だ解決に至っておりません。

0
0
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?