Issue deploying RoR app in CF - ruby-on-rails

I am trying to deploy a RoR app using Ruby 2.2.0 and Rails 4.2.0, gem file below. I can run the app locally but when I push to CF I get the following error without any helpful info.
2015-03-03T14:31:26.61-0500 [API] ERR Encountered error: Staging error: failed to stage application:
2015-03-03T14:31:26.61-0500 [API] ERR Script exited with status 255
I am using the CF community ruby buildpack (https://github.com/cloudfoundry/ruby-buildpack.git) since it seems to be the only one support ruby 2.2.
The command I am using to push is cf push myapp -b https://github.com/cloudfoundry/ruby-buildpack.git
Gemfile:
source 'https://rubygems.org'
ruby "2.2.0"
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.2.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .js.coffee assets and views
gem 'coffee-rails'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
gem 'therubyracer', platforms: :ruby
# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 1.2'
# https://github.com/namick/obfuscate_id
gem 'obfuscate_id', github: 'namick/obfuscate_id'
gem 'yui-compressor'
# https://github.com/attr-encrypted/attr_encrypted
gem 'attr_encrypted'
group :doc do
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', require: false
end
group :development, :test do
gem 'rspec-rails', '~> 3.0'
gem 'factory_girl_rails', "~> 4.0"
gem 'capybara'
gem 'capybara-email' #, github: 'dockyard/capybara-email'
gem 'guard-rspec'
gem 'guard-livereload'
gem 'guard-resque', github: 'railsjedi/guard-resque'
gem 'launchy'
gem 'faker'
gem 'pry-byebug'
gem 'pry-macro'
gem 'seed_dumper'
gem 'ruby-prof'
# Enough of these assets messages in log!
gem 'disable_assets_logger'
gem 'railroady'
end
# Testing
group :test do
gem 'simplecov', require: false
gem 'rubocop', require: false
gem 'rubocop-rspec', require: false
gem "database_cleaner"
gem 'timecop'
gem 'poltergeist'
gem "fakeredis", :require => "fakeredis/rspec"
end
group :development do
# gem 'binding_of_caller', '>= 0.7.1'
# gem 'better_errors', '>= 0.7.2'
gem 'web-console', '~> 2.0'
gem 'binding_of_caller', '0.7.3.pre1'
gem 'capistrano'
gem 'capistrano-rvm'
gem 'capistrano-rails'
gem 'capistrano-resque', '~> 0.2.1', require: false
gem 'spring-commands-rspec'
gem 'awesome_print'
gem 'pry-rails'
gem 'meta_request'
gem 'bullet'
end
# Database
gem 'pg'
gem 'sqlite3'
gem 'cf-autoconfig'
gem 'groupdate'
gem 'redis-rails'
gem 'apartment', github: 'influitive/apartment'
# Service object pattern
gem 'interactor-rails', '~> 2.0'
# Currency
gem 'money-rails'
gem 'google_currency'
# Analytics
gem 'ga_events'
gem 'newrelic_rpm'
# Twitter Bootstrap
gem 'sass-rails', '4.0.3'
gem 'bootstrap-sass', '~> 3.3.1'
gem 'bootstrap-sass-extras'
gem 'autoprefixer-rails'
gem 'momentjs-rails', '>= 2.8.1'
gem 'bootstrap3-datetimepicker-rails', '~> 3.1.3'
# Design stuff
#gem 'table_for_collection'
gem 'simple_form', github: 'plataformatec/simple_form'
gem "font-awesome-rails"
# Static pages (without dealing with too many routes)
gem 'high_voltage'
gem 'nestive', '~> 0.5'
# Social Network Sharing
# gem 'shareable'
# Front-end
gem 'haml-rails'
gem 'draper', '~> 1.4'
gem 'humane-rails'
gem 'autonumeric-rails'
gem 'country_select'
# A/B Testing gem (remove for optimizely?)
gem 'split', require: 'split/dashboard'
# Structure js files and view integration
gem 'pluggable_js', '~> 2.0.0'
# Sign up wizard
gem 'wicked'
# Graphs
gem 'lazy_high_charts'
#Account management
gem 'devise'
gem 'devise_invitable'
gem 'omniauth'
gem 'omniauth-xero', github: 'kaleworsley/omniauth-xero'
gem 'omniauth-freshbooks'
gem 'omniauth-quickbooks'
#gem 'omniauth-linkedin'
#gem 'omniauth-twitter'
#gem 'omniauth-facebook'
#gem 'omniauth-yelp'
gem 'pundit'
# Audit
gem 'paper_trail', '~> 3.0.5'
gem 'activeadmin', github: 'activeadmin'
gem 'enumerize'
gem 'enum_help'
# External accounts
#gem 'xeroizer', '2.15.5'
gem 'freshbooks.rb'
gem 'quickbooks-ruby'
#https://github.com/cloocher/aggcat
#gem 'aggcat'
# MailChimp integration
gem 'gibbon'
# Contact us, https://github.com/plataformatec/mail_form
gem 'mail_form'
# Page caching
gem 'actionpack-page_caching'
# Other helpers
gem "workflow"
#gem "httparty"
gem "resque", "~> 1.25.2"
gem 'resque-status'

I actually ended up pulling a clean copy from git of my app and used the (https://github.com/cloudfoundry/ruby-buildpack.git buildpack and everything magically worked. I think Cloud Foundry was trying to use an old version of a buildpack somehow...

Related

Pickup rails changes on save NOT next request

Whenever I make a code change, the rails server doesn't pick it up right away. Then the next request that comes in is delayed for about 20 seconds, even if the code was changed over a few minutes ago.
Is there any way around this?
I got no configuration for file watching.
Gemfile
source 'https://rubygems.org'
git_source(:github) do |repo_name|
repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/")
"https://github.com/#{repo_name}.git"
end
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 4.2', '>= 4.2.11'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.0'
gem 'sprockets', '2.11.0'
gem 'bootstrap-sass'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .js.coffee assets and views
gem 'coffee-rails', '~> 4.0.0'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
# We're not requiring them here because we do it in application.rb. We need
# mongoid to be loaded before ransack in order for ransack to load the mongoid
# adapter.
gem 'mongoid', '~> 5.4.0', require: false
gem 'ransack', '~> 1.8', '>= 1.8.9', require: false
# Was extracted from mongoid in mongoid 5.x
gem 'mongoid_rails_migrations'
gem 'kaminari-mongoid', '~> 1.0'
# address to lng/lat
gem 'geokit-rails'
# ip to geo. can replace the above one day.
gem 'geocoder'
# Use jquery as the JavaScript library
gem 'jquery-rails'
gem 'jquery-ui-rails'
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', '~> 0.4.0', group: :doc
# JSON baking
gem 'active_model_serializers', '~> 0.8.0'
gem 'money-rails', '~>1', github: 'nim901/money-rails'
gem 'angularjs-rails'
gem 'require_all', '~> 1.5'
# Display maps in views
gem 'gmaps4rails', '~> 2.1.2'
gem 'underscore-rails'
gem 'thin', '~> 1.8.1'
gem 'faraday', '~> 0.9'
gem 'websocket-rails', github: 'moaa/websocket-rails', branch: 'sync_fixes'
# Websocket rails requires this version of faye, otherwise we get connectivity
# issues.
gem 'faye-websocket', '0.10.0'
gem 'turbolinks', '~> 2.5', '>= 2.5.3'
gem 'devise', '~> 4.4.3'
gem 'devise-security'
gem 'activeadmin', '~> 1.0.0.pre5'
gem 'activeadmin-mongoid', github: 'nim901/activeadmin-mongoid', branch: 'nb/mongoid-5'
gem 'cancancan', '~> 1.9'
# maintenance of environment variables in application.yml
gem 'figaro'
# acts as state machine gem
gem 'aasm', '~> 4.11', '>= 4.11.1'
# Storing files on s3
gem 'paperclip', '~> 6.1'
gem 'mongoid-paperclip', '~> 0.0.11'
gem 'aws-sdk-lambda', '~> 1.31'
gem 'aws-sdk-s3', '~> 1.52'
gem 'aws-sdk-sns', '~> 1.20'
gem 'aws-sdk-ssm', '~> 1.58'
gem 'aws-sdk-rails', '~> 2.1'
gem 'rgeo', '~> 0.5.3'
gem 'ffi-geos'
gem 'mongoid-geospatial'
gem 'mechanize', require: false
gem 'carmen'
gem 'bcrypt'
gem 'koala' # FB
gem 'barby'
gem 'rqrcode'
gem 'active_admin_theme'
gem 'twilio-ruby'
gem 'authy'
gem 'nearest_time_zone' # convert ll to timezone
gem 'timezone' # To get local time
gem 'time_difference', '~> 0.5.0'
gem 'http'
# Validate Colors
gem 'chroma'
# User agent and stuff
gem 'browser'
gem 'activejob', '~> 4.2', '>= 4.2.7.1'
gem 'delayed_job_mongoid', '~> 2.3'
# POS Integrations
gem 'lightspeed_pos', github: 'yosi-dediashvili/lightspeed_pos'
gem 'shopify_api'
gem 'square', github: 'namedpipe/square'
gem 'magento_client'
# OmniAuth strategies
gem 'omniauth-lightspeed', '~> 1.0'
gem 'omniauth-clover'
gem 'omniauth-shopify-oauth2'
gem 'omniauth-square', github: 'backupparachute/omniauth-square'
gem 'apple_id'
gem 'newrelic_rpm'
gem 'rest-client', '~> 2.0'
gem 'premailer-rails'
gem 'fast-stemmer'
gem 'activeadmin_addons', '~> 0.12.0'
gem 'gtin', git: 'https://github.com/yosi-dediashvili/gtin.git'
gem 'webmock'
gem "font-awesome-rails"
# For activeadmin charts
gem "chartkick"
# The long watied shipping!! developed by Shopify :~
gem "active_shipping", '2.1.1'
gem 'measured', '~> 2.4.0'
gem "gibbon", '~> 3.0'
gem 'wicked_pdf'
gem 'wkhtmltopdf-binary'
# Used to convert BoxCheck's PDF label to PNG.
gem 'pdf-reader'
# Feature flipping.
gem 'flipper'
gem 'flipper-mongo'
gem 'flipper-ui'
# Wrapper for all the payment gateways.
gem 'activemerchant'
# payment processing for settlement of transactions upon merchant confirmation.
gem 'braintree', '~> 2.78'
gem 'stripe', '~> 5.34'
# Email templating
gem 'liquid', '~> 3.0', '>= 3.0.6'
gem "timerange"
# Parse natural language of date & time inputs.
gem 'chronic'
gem "wysiwyg-rails"
gem 'sendgrid-ruby'
gem 'redis-activesupport', '~> 5.0', '>= 5.0.7'
# Version 4 of redis causes websocket-rails to crash.
gem 'redis', '~> 3.3', '>= 3.3.5'
gem 'parallel', '~> 1.12.0'
gem 'mimemagic', '0.3.7'
gem 'nokogiri', '~> 1.11.2'
# Easier console experience.
gem 'pry-rails'
gem 'pry-byebug'
gem 'pry-stack_explorer'
gem 'google_maps_service'
gem 'googleauth', "~> 0.16.0", github: 'gabiberin/google-auth-library-ruby'
gem 'signet', "~> 0.14", github: 'gabiberin/signet'
gem 'google-ads-googleads', "~> 10.0.0"
gem 'rails_semantic_logger'
group :development do
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring', '~> 1.7', '>= 1.7.2'
gem 'spring-commands-rspec'
gem "better_errors", github: 'charliesome/better_errors'
gem 'awesome_print'
gem 'derailed_benchmarks'
gem 'bumbler'
gem 'rails_semantic_logger'
end
group :test do
gem 'dredd_hooks'
gem 'seed_dump'
gem 'fake_braintree', github: 'yosi-dediashvili/fake_braintree'
# Used by fake_braintree, but setting this so that we will get their fix for
# Ruby 2.4 "warning: constant ::Fixnum is deprecated"
gem 'sinatra', '~> 1.4', '>= 1.4.8'
gem 'email_spec', '~> 2.1'
gem 'rspec-rails', '~> 3.8', '>= 3.8.1'
gem 'rspec-collection_matchers'
gem 'guard-rspec', '~> 4.7', '>= 4.7.3'
gem 'rspec-benchmark'
gem 'listen'
gem 'faker'
gem 'fuubar'
gem 'timecop'
gem 'rspec-json_expectations'
gem 'shoulda-matchers', '~> 3.1'
# I don't remember exactly the story behind this gem, just that it's related
# to the requests omitting empty array element in json requests on tests if
# we're not using this gem.
gem 'rack-test', '0.6.3'
gem 'parallel_tests', '~> 2.27'
gem 'rspec-html-matchers', '~> 0.9.1'
gem 'rspec-retry', '~> 0.6.1'
end
group :production do
# full blown tagged semantic logger should run in production only
gem 'amazing_print'
end
As per the Gemfile, you are using spring gem which is used to reload code in development while server is running. If it causing some issue, then you can restart the spring process so it will work seamlessly with new codebase. This should be required everytime you make changes in the code. I encountered this only when I am either starting with new project and a lot of code is changed. Till today, I have needed to execute this command only for 4-5 times.

Why is bundler looking for mysql2 -v '0.4.4' --source 'https://rubygems.org/'

Below is my Gemfile but i haven't specified the mysql2 version but for some reason it's looking for 0.4.4. It must be a dependency of another gem. I was just assigned thAny ideas?
source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.2.6'
# Use sqlite3 as the database for Active Record
gem 'mysql2', group: :production
# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.1.0'
# See https://github.com/rails/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.0'
gem 'active_model_serializers', '~> 0.10.0.rc5'
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', '~> 0.4.0', group: :doc
gem 'acts_as_better_tree'
gem 'rest-client', '~> 1.8'
gem 'apipie-rails', :github => 'Apipie/apipie-rails'
gem 'devise'
gem 'petergate'
gem 'pry-rails'
gem 'annotate'
gem 'slim-rails'
gem 'bootstrap-sass'
gem 'font-awesome-sass'
gem 'carrierwave'
gem 'carrierwave-base64'
gem 'carrierwave-aws'
gem 'authorizenet'
gem 'figaro'
gem 'roo', '~> 2.3.2'
gem 'roo-xls', '~> 1.0'
gem 'mini_magick', '~> 4.5'
gem 'html5shiv-rails'
gem 'cocoon'
gem 'will_paginate'
gem 'wicked_pdf'
gem 'wkhtmltopdf_binary'
gem "minitest-rails"
gem "minitest-reporters"
gem 'airbrake', '~> 5.6'
# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development
group :development do
# Access an IRB console on exception pages or by using <%= console %> in views
gem 'web-console', '~> 2.0'
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring'
gem 'capistrano'
gem 'capistrano-passenger'
gem 'capistrano-bundler'
gem 'capistrano-rails'
gem 'capistrano-rails-console'
gem 'capistrano-rvm'
gem 'better_errors'
gem 'pry'
end
group :development, :test do
gem 'sqlite3'
gem 'byebug'
end
$ gem dependency mysql2 --reverse-dependencies
It'll list each version of mysql2 and then the gems that depend on that version.
I believe the problem is with the rails version and mysql2 version. Change the Gemfile line that contains gem 'mysql2' to gem 'mysql2', '~> 0.4.0'
I have gem 'rails', '4.2.6' installed but apparently there is some compile error with mysql2 and that version of rails.
"For Rails 4.x please pin the gem to mysql2 '~> 0.4.0'" - sodabrew
After doing this the bundle install ran and I was able to run rails c without errors.

rails generate cucumber:install fails with "Could not load generator"

I tried to install Cucumber, but rails g cucumber:install shows an error in the terminal:
[WARNING] Could not load generator "generators/cucumber/install/install_generator". Error: uninitialized constant Cucumber::Generators::InstallBase::Config.
Here is the part of my Gemfile with cucumber-rails:
group :test do
gem 'faker'
gem 'capybara'
gem 'guard-rspec'
gem 'cucumber-rails', :require => false
gem 'database_cleaner'
gem 'selenium-webdriver'
gem 'gherkin'
gem "launchy", "~> 2.1.2"
end
Here's my entire Gemfile:
source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.2.5'
# Use postgresql as the database for Active Record
gem 'pg', '~> 0.15'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.1.0'
# See https://github.com/rails/execjs#readme for more supported runtimes gem 'therubyracer', platforms: :ruby
gem 'devise'
# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.0'
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', '~> 0.4.0', group: :doc
gem 'therubyracer'
gem 'cancan'
gem 'roo'
# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'
gem 'bcrypt-ruby', :require => 'bcrypt'
gem 'twitter-bootstrap-rails', :git => 'git://github.com/seyhunak/twitter-bootstrap-rails.git'
# Use Unicorn as the app server
# gem 'unicorn'
gem 'birthday'
gem 'pry-nav'
gem 'unread'
gem 'week_of_month'
gem 'city-state'
gem 'carmen-rails'
gem "nested_form"
gem 'prawn'
gem 'wicked_pdf'
gem 'wkhtmltopdf-binary'
gem 'prawn-table', '~> 0.1.0'
gem 'rails_12factor', group: :production
gem 'whenever', require: false
gem 'simplecov', :require => false, :group => :test
#Image uploading
gem 'carrierwave'
gem 'carrierwave-dropbox'
gem 'client_side_validations'
#Use Capistrano for deployment
# gem 'capistrano-rails', group: :development
gem 'bootstrap-datepicker-rails', :require => 'bootstrap-datepicker-rails',
:git => 'git://github.com/Nerian/bootstrap-datepicker-rails.git'
gem 'fullcalendar-rails'
gem 'simple_form'
gem 'momentjs-rails'
gem 'google-api-client'
gem 'omniauth'
gem 'omniauth-google-oauth2', :git => 'https://github.com/zquestz/omniauth-google-oauth2.git'
group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug'
#gem "rspec-rails"
gem 'factory_girl_rails'
end
group :test do
gem 'faker'
gem 'capybara'
gem 'guard-rspec'
gem 'cucumber-rails', :require => false
gem 'database_cleaner'
gem 'selenium-webdriver'
gem 'gherkin'
gem "launchy", "~> 2.1.2"
end
group :development do
# Access an IRB console on exception pages or by using <%= console %> in views
gem 'web-console', '~> 2.0'
gem 'will_paginate'
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring'
end
gem 'bootstrap-sass', '~> 3.3.5'
gem 'bootstrap-timepicker-rails-addon', :require => 'bootstrap-timepicker-rails-addon',
:git => 'git://github.com/ywjno/bootstrap-timepicker-rails-addon.git'
It's possible that spring is started and is unable to load the generator. Try
DISABLE_SPRING=1 rails g cucumber:install

cap production deploy ruby on rails

I tried to deploy the ruby on rails project from a github folder. However, I got such an error when I run cap production deploy
/home/deploy/.rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in
'require': cannot load such file -- capistrano/cli (LoadError) from /home/deploy/.rbenv/
versions/2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in 'require'
from /usr/bin/cap:3:in '<main>'
I have deploy.rb starting with:
# config valid only for Capistrano 3.1
lock '3.1.0'
And I installed Capistrano v.3.1 with the following command-line:
gem install capistrano -v 3.1.0
Anybody has ideas why I still got an error?
Attached Gemfile:
source 'https://rubygems.org'
gem 'rails', '4.1.0'
# Frontend
gem 'simple_form'
gem 'nested_form', github: 'ryanb/nested_form'
gem 'turbolinks'
gem 'bootstrap-sass', '~> 3.2.0'
gem 'kaminari'
# Javascript
gem 'gon'
gem 'angularjs-rails'
gem 'selectize-rails'
gem 'js-routes'
# Backend
gem 'pg'
gem 'mongoid', github: 'mongoid/mongoid'
gem 'mongoid_geospatial'
gem "active_model_serializers"
gem 'devise'
gem 'state_machine'
gem "rolify"
gem "pundit"
gem 'enumerize'
gem 'simple-rss'
gem 'tweetstream'
gem 'swagger-docs', path: "vendor/gems/swagger-docs-0.1.5"
gem 'wkhtmltopdf-binary'
gem 'wicked_pdf'
gem 'paper_trail', '~> 3.0.3'
# Temporary
gem 'faker'
gem 'factory_girl_rails'
# Asset gems
gem 'haml-rails'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.0.0'
gem 'jquery-rails'
gem 'sass-rails', '~> 4.0.3'
gem 'compass-rails'
group :development do
gem 'spring' # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'switch_user'
gem 'better_errors'
gem 'binding_of_caller'
gem 'sextant'
gem 'guard-livereload', require: false
gem 'capistrano', '~> 3.1.0'
gem 'capistrano-bundler', '~> 1.1.2'
gem 'capistrano-rails', '~> 1.1.1'
gem 'capistrano-rbenv', github: "capistrano/rbenv"
end
group :test do
gem 'rspec-rails'
gem 'spring-commands-rspec'
gem 'guard-rspec'
gem 'fuubar'
gem 'capybara'
gem 'capybara-webkit'
gem 'capybara-email'
gem 'capybara-screenshot'
gem 'database_cleaner'
end
group :test, :darwin do
gem 'rb-fsevent'# if `uname` =~ /Darwin/
end
group :development, :test do
gem 'pry-rails'
gem 'pry-remote'
end
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
# Use unicorn as the app server
# gem 'unicorn'
# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development
# Use debugger
# gem 'debugger', group: [:development, :test]
Thanks!

rails doorkeeper respond with 500 for some application setting

I am using doorkeeper for OAuth functionality on my ruby on rails application. Suddenly doorkeeper became unable to create token in production mode for some Doorkeeper::Application (i have three Doorkeeper::Application settings) without writing in the production log file, but yesterday it worked normally.
Every time on POST "/oauth/token" doorkeeper returns 500 page for this Doorkeeper::Application, but 201 for another one.
When I recreated Doorkeeper::Application configuration in database without changing parameters, doorkeeper began to work normally with this new record.
I am using postgres with doorkeeper v 0.6.7.
Here is my gemfile:
source 'https://rubygems.org'
def darwin_only(require_as)
RUBY_PLATFORM.include?('darwin') && require_as
end
def linux_only(require_as)
RUBY_PLATFORM.include?('linux') && require_as
end
gem 'rails', '3.2.16'
gem 'jquery-rails'
gem 'pg'
gem 'slim-rails'
gem 'inherited_resources'
gem 'simple_form'
gem 'twitter-bootstrap-rails'
gem 'airbrake', '3.1.2'
gem 'devise'
gem 'httparty'
gem 'ledermann-rails-settings', :require => 'rails-settings'
gem 'carrierwave', git: 'git://github.com/jnicklas/carrierwave.git', ref: '809e86b697'
gem 'mini_magick'
gem 'ruby-progressbar'
gem 'doorkeeper', '~> 0.6.7'
gem 'jsonify-rails'
gem 'less-rails'
gem 'therubyracer', '0.12.1'
gem 'cancan'
gem 'push-core', git: 'git://github.com/tompesman/push-core.git', ref: '980ddc107f'
gem 'push-apns'
gem 'push-gcm'
gem 'delayed_job_active_record'
gem 'daemons'
gem 'recaptcha', require: 'recaptcha/rails'
gem 'validates_timeliness'
gem 'paper_trail'
gem 'oj'
gem 'kaminari'
gem 'newrelic_rpm'
gem 'russian'
gem 'nested_form', '~> 0.3.2'
gem 'select2-rails'
gem 'jquery-ui-rails'
gem 'bourbon'
gem 'axlsx_rails'
gem 'sanitize'
gem 'gilenson'
gem 'ace-rails-ap'
gem 'activerecord-postgres-hstore'
gem 'geocoder'
gem 'rest-client'
gem 'figaro'
gem 'rails-erd'
gem 'acts_as_singleton'
gem 'carrierwave-processing'
group :development do
gem 'thin'
gem 'capistrano'
gem 'capistrano-ext'
gem 'rvm-capistrano'
gem 'yard'
gem 'quiet_assets'
gem 'pry-rails'
gem 'pry-plus'
gem 'ZenTest', '4.9.5'
end
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
gem 'uglifier', '>= 1.0.3'
gem 'jquery-datatables-rails', git: 'git://github.com/rweng/jquery-datatables-rails.git'
end
group :test, :development do
gem 'rspec-rails', '~> 2.0'
gem 'spork-rails'
# Guard
gem 'guard-rspec'
gem 'guard-spork'
# File changes
gem 'rb-fsevent', require: darwin_only('rb-fsevent')
gem 'rb-inotify', require: linux_only('rb-inotify')
# Notifications
gem 'terminal-notifier-guard', require: darwin_only('terminal-notifier-guard')
end
group :test do
gem 'factory_girl_rails'
gem 'shoulda-matchers'
gem 'autotest-rails'
gem 'ffaker'
gem 'webmock'
gem 'vcr'
gem 'capybara'
gem 'json_spec'
gem 'simplecov', require: false
gem 'simplecov-sublime-ruby-coverage', require: false
gem 'test_after_commit'
end
What can be wrong with doorkeeper?

Resources