Deploy rails 3.2 app fails with capistrano filename too long - ruby-on-rails

Needs help to solve fails capistrano deploy proccess.
We attempt to deploy our app with capistrano and it fails with cash error
GemFile look like this
source 'https://rubygems.org'
gem 'rails', '3.2.13'
gem 'mysql2'
gem 'haml'
gem 'rake', '10.0.3'
gem 'dalli'
gem 'russian'
gem 'kaminari'
gem "rails-settings-cached"
gem 'devise'
gem 'activeadmin'
gem 'enumerize'
gem 'rack-cache', :require => 'rack/cache'
gem 'dragonfly', '~> 0.9.12'
gem 'imperavi-rails', :github => 'Paxa/imperavi-rails', :ref => 'ec989856'
gem 'awesome_nested_set'
gem 'exception_notification', '2.6.1'
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
gem 'uglifier', '>= 1.0.3'
gem 'therubyracer', '0.10.2', :platforms => :ruby
end
gem 'right-rails'
group :development do
gem 'hipchat'
gem 'capistrano'
gem 'capistrano_colors'
gem 'rvm-capistrano'
end
group :production do
gem 'thin'
end
In last commit was add right-dialog js and css
How can we fix this?
Thanks.

Related

undefined method `[]' for "font":Sass::Script::Value::String

I am running my rails application I encountered the above error.
I guess it has something to do with sass rails and font awesome.
Here is my gemfile
source 'https://rubygems.org'
ruby '2.2.3'
gem 'rails', '4.2.6'
gem 'jquery-rails'
gem 'jquery-turbolinks'
gem 'jquery-ui-rails'
gem 'devise'
gem 'simple_form'
gem 'will_paginate'
gem 'bootstrap-will_paginate'
#gem 'activerecord-reputation-system', require: 'reputation_system'
gem 'activerecord-reputation-system', github: 'NARKOZ/activerecord-reputation-system', branch: 'rails4'
gem 'acts-as-taggable-on'
gem 'randumb'
gem 'turbolinks'
gem 'mobu'
#gem 'font_assets' rails 3?
#gem 'font-awesome-rails', '4.2' #'3.1.1.0'
gem 'font-awesome-rails'
gem 'protected_attributes' #for attr_accesible instead of strong params..
#this is active admin gem
#gem 'activeadmin', github: 'activeadmin'
gem 'activeadmin', '~> 1.0.0.pre2'
gem 'rack-cors', :require => 'rack/cors'
#group :assets do
gem 'sass-rails', '~> 5.0'
gem 'coffee-rails' #, '~> 3.2.1'
gem 'uglifier' #, '>= 1.0.3'
gem 'bootstrap-sass'
gem 'tzinfo-data' #rails 4 stuff
gem 'pg'
# this gem is used for pagination
#gem 'kaminari'
group :production do
#gem 'heroku-deflater' need rails 4 fix, this gem helps to optimize app performance
gem 'unicorn'
gem 'rails_12factor'
end
group :development, :test do
gem 'better_errors' #need ruby 2.0
end
I tried to update sass rails and sprockets but of no use.I have tried to use #import fontawesome in a stylesheet other than application.css.
In my case the trouble was a result of custom fonts.
Solution was to remove the 'font' parameter from the asset-url helper.
previous:
asset-url('custom-webfont.svg', 'font') format('svg');
new
asset-url('custom-webfont.svg') format('svg');

Devise wrong number of arguments (2 for 1)

Existing issue There is an existing question and I am getting the exact error after upgrading to rails 4.2.0.
The above issue was a conflict between devise and clearance but I am not using clearance. I suspect that some of my gem is causing the problem.
Here is my code:
gemfile
source 'https://rubygems.org'
gem 'rails', '4.2.0'
gem 'sass-rails', '~> 4.0.0'
gem "figaro"
gem 'nokogiri'
gem 'bootstrap-editable-rails'
gem 'devise'
gem 'devise_token_auth'
gem 'devise_invitable', '~> 1.3.3'
gem 'omniauth'
gem 'omniauth-facebook'
gem 'redis'
gem 'switch_user', '0.9.4'
gem 'websocket-rails', '0.6.2'
gem 'twilio-ruby', '~> 3.11'
gem 'aasm'
gem 'acts_as_tenant'
gem 'activerecord-postgresql-adapter'
gem 'annotate', '>=2.6.0'
gem 'chronic_duration'
gem 'attribute-defaults'
gem 'groupdate'
gem 'hairtrigger'
gem 'money-rails'
gem 'nilify_blanks'
gem 'pacecar'
gem 'paranoid2'
gem 'schema_plus'
gem 'time_ago_in_words'
gem 'validates_timeliness', '~> 3.0'
gem 'spreadsheet'
gem 'client_side_validations', github: 'DavyJonesLocker/client_side_validations'
gem 'client_side_validations-simple_form', github: 'DavyJonesLocker/client_side_validations-simple_form'
gem 'kaminari'
gem 'rails-timeago', '~> 2.0'
gem 'simple_form'
gem 'slim-rails'
gem 'twitter-bootstrap-rails', :github => 'seyhunak/twitter-bootstrap-rails', :branch => :bootstrap3
gem 'jquery-datatables-rails', '~> 2.2.3'
gem 'jquery-turbolinks'
gem 'twitter-bootstrap-calendar'
gem 'dust-rails', '0.4.0'
gem 'coffee-rails'
gem 'execjs'
gem 'gon'
gem 'jbuilder', '~> 1.2'
gem 'jquery-rails'
gem 'jquery-ui-rails'
gem 'less-rails'
gem 'remotipart', '~> 1.2'
gem 'therubyracer', platforms: :ruby
gem 'twitter-bootstrap-rails-confirm', github: 'bluerail/twitter-bootstrap-rails-confirm', branch: 'bootstrap3'
gem 'turbolinks'
gem 'uglifier', '>= 1.3.0'
gem 'paperclip', '~> 3.5.0'
gem 'sidekiq'
gem 'sinatra', '>= 1.3.0', :require => nil
gem 'whenever', :require => false
gem 'liquid'
group :doc do
gem 'sdoc', require: false
end
group :development do
gem 'better_errors'
gem 'binding_of_caller'
gem 'capistrano', '~> 3.1'
gem 'capistrano-rails', '~> 1.1'
gem 'capistrano-ext'
gem 'capistrano-rvm'
gem 'capistrano-bundler'
gem 'letter_opener'
gem 'quiet_assets'
gem 'pry', '~> 0.10.0'
gem 'brakeman', :require => false
gem 'meta_request'
end
group :test do
gem 'email_spec'
gem 'minitest'
end
First of all remove devise from your application .
Then do a bundle install .
And finally again , install devise .
This will work .
If you are using Turbolinks, try updating the turbolinks gem. That fixed the issue for me after upgrading from Rails 4.1 to 4.2 and having this issue.

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?

Heroku / Rails 4 sqlite3 error on precompile

My Heroku deploy is failing on the Running: rake assets:precompile step with the follow:
Specified 'sqlite3' for database adapter, but the gem is not loaded. Add `gem 'sqlite3'` to your Gemfile.
My Gemfile has 'sqlite3' only in the development group, as you can see:
source 'https://rubygems.org'
ruby '2.0.0'
gem 'rails', '4.0.1'
gem 'sass-rails', '~> 4.0.0'
gem "compass-rails", "~> 2.0.alpha.0"
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.0.0'
gem 'jquery-rails'
gem 'turbolinks'
gem 'jbuilder', '~> 1.2'
gem 'devise'
gem 'figaro'
gem 'haml-rails'
gem 'sendgrid'
gem 'simple_form'
gem 'omniauth-twitter'
gem 'omniauth-facebook'
gem "cancan", :git => "git://github.com/ryanb/cancan.git", :branch => "2.0"
gem 'roadie', '2.4.2'
group :development do
gem 'better_errors'
gem 'binding_of_caller', :platforms=>[:mri_19, :mri_20, :rbx]
gem 'guard-bundler'
gem 'guard-rails'
gem 'guard-rspec'
gem 'guard-livereload'
gem 'html2haml'
gem 'quiet_assets'
gem 'rails_layout'
gem 'rb-fchange', :require=>false
gem 'rb-fsevent', :require=>false
gem 'rb-inotify', :require=>false
gem 'debugger'
end
group :development, :test do
gem 'factory_girl_rails'
gem 'rspec-rails'
gem 'zeus'
gem 'sqlite3'
end
group :test do
gem 'capybara'
gem 'capybara-webkit'
gem 'database_cleaner', '1.0.1'
gem 'email_spec'
end
group :production do
gem 'unicorn'
gem 'passenger'
gem 'rails_12factor'
end
Additionally, I am using the rails_12factor gem and user-env-compile thing... neither helped with the error. I've also added RACK_ENV=production and RAILS_ENV=production config vars to the Heroku environment, to be safe.
Seems like it Heroku is firing up the development environment when precompiling. Any ideas why?
On Heroku, I've never gotten away without having pg in my production group.
group :production do
gem 'pg'
gem 'rails_12factor'
end
Assuming you're using that database in prod, of course.

There was an error in your Gemfile after running rails server

I tried running rails s and it gave me an error: There was an error in your Gemfile, and Bundler cannot continue.
Here's the Gemfile:
source 'https://rubygems.org'
gem 'rails', '3.2.3'
gem 'bootstrap-sass'
gem 'will_paginate'
gem 'bootstrap-will_paginate'
gem 'annotate'
gem 'pg'
gem 'faker'
gem 'omniauth-facebook'
gem 'fb_graph'
gem 'jquery-rails'
gem 'haml'
gem 'haml-rails', '= 0.3.4'
gem 'bcrypt-ruby', '~> 3.0.0'
gem 'thin'
gem 'google-analytics-rails'
gem 'nokogiri'
gem 'differ'
gem 'geocoder'
gem 'newrelic_rpm'
group :development do
gem "rails-erd"
gem 'rspec'
gem 'quiet_assets'
end
group :test, :development do
gem 'mail_safe', '0.3.1'
gem "rspec-rails", "~> 2.0"
gem 'shoulda-matchers'
gem "factory_girl_rails", "~> 3.0"
gem 'pry'
gem 'pry-rails'
gem 'pry-remote'
gem 'pry-nav'
end
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
gem 'uglifier', '>= 1.0.3'
end
group :development, :production do
gem 'gmaps4rails'
end

Resources