0

I'm moving a Rails app (written by somebody else) from running on an OSX server to a CentOS server and during my setup process I am trying to create the database using the command...

/usr/bin/bundle exec /usr/bin/rake db:create RAILS_ENV=production POSTGRES_DIR=/usr

This call fails with the error:

libc.dylib: cannot open shared object file: No such file or directory

Which makes no sense to me at all, dylib files are an OSX thing and so I don't know why the Rails db:create operation would be looking for libc.dylib? Shouldn't it just load up the standard Linux libc.so?

What is db:create actually executing that has this dependency?

Fraser Graham
  • 4,650
  • 4
  • 22
  • 42

1 Answers1

0

My repository had a cache of .gem files generated by the bundler when running on OSX and submitted to source control. One of those gems was an OSX binary, the db:create call runs through the all the initializer code to execute the calls to the ORM and so even though those modules were not being used during the db:create functions they were attempting to load.

Fraser Graham
  • 4,650
  • 4
  • 22
  • 42