내 Sinatra 앱이 sqlite로 로컬 설치시 정상적으로 작동했습니다. Heroku가 이동했을 때, 나는 이상한 오류를했다, 그래서 나도 내 로컬 응용 프로그램에서 포스트 그레스로 전환, 나는 이러한 오류를 받고 있어요 : IRB에서 모델을로드 할 때Postgres로 전환 한 후 앱 작동이 중지되었습니다.
dyld: lazy symbol binding failed: Symbol not found: _rb_thread_select
Referenced from: /Users/Emanuele/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/extensions/x86_64-darwin-14/2.2.0-static/do_postgres-0.10.14/do_postgres/do_postgres.bundle
Expected in: flat namespace
dyld: Symbol not found: _rb_thread_select
Referenced from: /Users/Emanuele/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/extensions/x86_64-darwin-14/2.2.0-static/do_postgres-0.10.14/do_postgres/do_postgres.bundle
Expected in: flat namespace
마찬가지입니다.
require 'data_mapper'
require 'dm-types'
require 'dm-validations'
require 'dm-postgres-adapter'
require 'bcrypt'
# Setup DataMapper with a database URL. Will use ENV['DATABASE_URL'] on Heroku.
DataMapper.setup(:default, 'postgres://localhost/myapp')
# Let's define the model
class User
include DataMapper::Resource
include BCrypt
property :id, Serial, :key => true
property :email, String, :length => 5..70, :unique => true, :required => true, :format => :email_address
property :password, BCryptHash
property :account_sid, String, :length => 34
property :auth_token, String, :length => 32
property :app_sid, String, :length => 34
def authenticate(attempted_password)
if self.password == attempted_password
true
else
false
end
end
end
# Finalize the DataMapper model.
DataMapper.finalize
# Tell DataMapper to update the database according to the definitions above.
DataMapper.auto_upgrade!
내가 앱이 다시 작동하기 시작 sqlite3를 다시 전환 :
여기 내 모델 파일입니다. 나는 그 오류를 찾아 낼 수 없다. 온라인으로 검색 한 결과가 없습니다.
아무도 무슨 일이 일어나고 있으며 어떻게 고칠 수 있고 Heroku에서 내 앱을 게시 할 수 있는지에 대한 아이디어가 있습니까?
자세한 정보가 필요하면 문의하십시오.
감사합니다.
Mac에 있습니까? –
예, Mac에 있지만 Ruby 2.2.0과 같은 것으로 보입니다. 2.1.5로 다시 전환하면 문제가 해결되었습니다. 그림을 이동. –