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.
Related
Im trying to add ActiveAdmin to a (massive) application. I follow all the steps here:
https://activeadmin.info/0-installation.html#setting-up-active-admin
The installation process was fine. My problem here is with the assets. When I tried to run:
http://localhost:3000/admin/login/
I got an error:
Showing /Users/fmaymone/.rvm/gems/ruby-2.3.0/gems/activeadmin-
1.1.0/app/views/layouts/active_admin_logged_out.html.erb where line #9 raised:
couldn't find file 'jquery3' with type 'application/javascript'
Checked in these paths:
This application is kind of tricky. Its running webpack together with the rails server. I never worked with this kind of configuration.
Theres not a application.js where I can add a require//
I tried doing a npm i jquery too.
Should I put directly inside the webpack the jquery.js?
This is my GemFile
gem 'rails', '4.2.2'
# This needs to be declared earlier than alphabetical order to load properly re: the app.
gem 'paperclip', '~> 5.0.0'
gem 'activeadmin', '~> 1.4', '>= 1.4.3'
gem 'actionpack-action_caching'
gem 'active_model-errors_details'
gem 'active_model_serializers', '~> 0.10.0'
gem 'activerecord-rescue_from_duplicate'
gem 'activerecord-sqlserver-adapter', '~> 4.2.0'
gem 'addressable'
gem 'ahoy_email'
gem 'ahoy_matey'
gem 'airbrake', '~>6.2'
gem 'ajax-datatables-rails'
gem 'asset_sync'
gem 'attachment_on_the_fly'
gem 'aws-sdk', '~> 2.0'
gem 'axlsx', '2.1.0.pre'
gem 'axlsx_rails'
gem 'blazer'
gem 'bootstrap-generators', '~> 3.3.4'
gem 'bootstrap-sass', '~> 3.3.4'
gem 'browser-timezone-rails'
gem 'chronic'
gem 'coffee-rails', '~> 4.1.0'
gem 'countries'
gem 'daemons'
gem 'data_migrate', '~>5.0'
gem 'delayed_job', '~>4.1.5'
gem 'delayed_job_active_record'
gem 'devise'
gem 'dotenv-rails', :groups => [:development, :test]
gem 'double-bag-ftps'
gem 'faraday'
gem 'fog-aws'
gem 'font-awesome-sass', '~> 4.7.0'
gem 'geocoder', '~> 1.5.1'
gem 'hashdiff'
gem 'hashformer'
gem 'hashie'
gem 'htmlentities'
gem 'httparty'
gem 'hubspot-ruby', '~> 0.4.0'
gem 'jbuilder', '~> 2.0'
gem 'jira-ruby'
gem 'jquery-datatables-rails', github: "rweng/jquery-datatables-rails", branch: "master"
gem 'jquery-rails'
gem 'json-schema'
gem 'kaminari'
gem 'libv8', '6.7.288.46.1'
gem 'mailgun-ruby', '~>1.1.6'
gem 'marketingcloudsdk', '~> 1.0'
gem 'mini_racer', '0.2.3', platforms: :ruby
gem 'mjml-rails'
gem 'money-rails', '~>1'
gem 'multipart-post'
gem 'net-scp'
gem 'newrelic_rpm'
gem 'oj'
gem 'oj_mimic_json'
gem 'pg'
gem 'progress_bar'
gem 'rack-cors', :require => 'rack/cors'
gem 'rails-observers', '~> 0.1.2'
gem 'rails_admin', '~> 1.2.0'
gem 'ransack'
gem 'react_on_rails', '~>6'
gem 'rest-client'
gem 'retriable', '~> 3.1'
gem 'roo', '~> 2.7.0'
gem 'roo-xls'
gem 'rubyzip', '~> 1.1.0'
gem 'sass-rails', '~> 5.0.6'
gem 'savon', '~> 2.2.0'
gem 'schema_plus_pg_indexes'
gem 'sdoc', '~> 0.4.0', group: :doc
gem 'seed_dump'
gem 'simple_form'
gem 'slither', :git => 'https://github.com/Programatica/slither.git'
gem 'stripe'
gem 'sunspot_rails', '~> 2.2.5'
gem 'sunspot_solr', '~> 2.2.5'# optional pre-packaged Solr distribution for use in development
gem 'taxjar-ruby', require: 'taxjar'
gem 'thin'
gem 'tiny_tds'
gem 'twitter-typeahead-rails'
gem 'uglifier', '>= 1.3.0'
gem 'validates_timeliness', '~> 4.0'
gem 'wannabe_bool'
gem 'whenever', :require => false
gem 'wisper', '~> 2.0.0'
gem 'wisper-rspec', require: false, groups: [:development, :test]
gem 'workflow'
gem "graphql"
gem "graphql-errors"
gem "graphql-batch"
gem "graphql-guard"
gem "nokogiri"
group :production, :staging do
gem 'sprockets-redirect'
end
group :test do
gem 'shoulda-matchers', '~> 3.1', '>= 3.1.1'
gem 'shoulda-callback-matchers', '~> 1.1.1'
gem 'simplecov', :require => false
gem "vcr"
end
group :development do
gem 'web-console', '~> 2.0'
end
group :development, :test do
gem "pry"
gem 'pry-byebug'
gem "guard-rspec"
gem 'spring-commands-rspec'
gem 'graphiql-rails'
gem "puma"
gem 'byebug'
gem 'spring'
gem 'faker'
gem 'rspec'
gem 'rspec-rails'
gem 'rspec_candy'
gem 'factory_bot_rails'
gem 'capybara'
gem 'database_cleaner'
gem 'ffaker'
gem 'to_factory'
gem 'timecop'
gem 'test_after_commit', :group => :test
gem 'webmock'
end
Thanks
You are probably using an old version of jquery-rails which turn out to raise an error. jquery3 is required in the base javascript file, and the support for it was not available before the rails 4.2.0 version in jquery-rails gem. Therefore, I recommend you to check the versions of jquery-rails with rails and activeadmin gem.
i'm trying to test using minitest but when running this file with
bin/rails test test/controllers/api/v1/blogs_api_controller_test.rb
But it gives this error
.rvm/gems/ruby-2.3.1/gems/railties-5.1.1/lib/rails/railtie/configuration.rb:95:in
method_missing': undefined methodweb_console' for
(NoMethodError) Did you mean? console
require 'test_helper'
class BlogsApiControllerTest < ActiveSupport::TestCase
test 'Get all Blogs' do
assert false
end
end
Rails version 5.1.1 Ruby 2.3.1
Gem File
source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 5.1.1'
# Use Puma as the app server
gem 'puma', '~> 3.8.2'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 3.2.0'
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.2'
# See https://github.com/rails/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
# Use jquery as the JavaScript library
gem 'jquery-rails', '~> 4.1.1'
# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
gem 'turbolinks', '~> 5'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.6'
# Use Redis adapter to run Action Cable in production
# gem 'redis', '~> 3.0'
gem 'kaminari', '~> 0.17.0'
gem 'bootsy', '~> 2.4'
gem 'searchkick', '~> 3.0.2'
gem 'devise', '~> 4.3.0'
gem 'omniauth-facebook', '~> 3.0.0'
gem 'omniauth-google-oauth2', '~> 0.4.1'
gem 'cancancan', '~> 1.15.0'
gem 'paperclip', '~> 5.0.0'
gem 'sitemap_generator', '~> 5.1.0'
gem 'jwt'
gem 'simple_command'
gem 'rack-cors', require: 'rack/cors'
# For admin panel ----------------
gem 'activeadmin', '~> 1.0.0'
# Below are for rails 5
# gem 'inherited_resources', github: 'activeadmin/inherited_resources'
# gem 'ransack', github: 'activerecord-hackery/ransack'
gem 'draper', '~> 3.0.1'
# ---------------------
group :development, :test do
gem 'pry'
# Use mysql as the database for Active Record
gem 'mysql2', '~> 0.4.6'
end
group :development do
gem 'wdm', '>= 0.1.0' if Gem.win_platform?
# Access an IRB console on exception pages or by using <%= console %> anywhere in the code.
gem 'web-console'
gem 'listen', '~> 3.0.8'
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring'
gem 'spring-watcher-listen', '~> 2.0.1'
end
group :production do
gem 'pg', '~> 0.18.4'
end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
Please put gem 'web-console' into your Gemfile's test section. You can change the following lines
group :development, :test do
gem 'pry'
# Use mysql as the database for Active Record
gem 'mysql2', '~> 0.4.6'
end
with following
group :development, :test do
gem 'pry'
gem 'web-console'
# Use mysql as the database for Active Record
gem 'mysql2', '~> 0.4.6'
end
And remove web-console from following lines
group :development do
gem 'wdm', '>= 0.1.0' if Gem.win_platform?
# Access an IRB console on exception pages or by using <%= console %> anywhere in the code.
gem 'web-console' # remove this
Now run following command to update bundles
bundle install
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.
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...
I'm working on a Facebook app and using devise and omniauth-facebook for authentication.
I followed the wiki pages to set it up and also using OmniAuth.config.add_mock(:facebook, #omniauth_hash) for my specs.
This is my Gemfile:
source 'https://rubygems.org'
gem 'rails', '3.2.3'
gem 'sqlite3', '~> 1.3.6'
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
gem 'uglifier', '>= 1.0.3'
end
gem 'devise', '~> 2.0.4'
gem 'haml', '~> 3.1.4'
gem 'haml-rails', '~> 0.3.4'
gem 'therubyracer', '~> 0.9.10'
gem 'twitter-bootstrap-rails', '~> 2.0.6'
gem 'simple_form', '~> 2.0.2'
gem 'omniauth-facebook', '~> 1.2.0'
gem 'unicorn', '~> 4.3.1'
gem 'koala', '~> 1.4.1'
gem "formtastic", "~> 2.1.1" # 2.2.0 breaks activeadmin 0.4.3
gem 'activeadmin', '~> 0.4.3'
gem 'redis', '~> 2.2.2'
gem 'jquery-rails', '~> 2.0.2'
group :development, :test do
gem 'spork', '~> 1.0rc'
gem 'guard'
gem 'guard-test' # run tests automatically in background
gem 'annotate', '2.4.1.beta1'
gem 'guard-annotate' # annotate models, tests, etc with infos from db
gem 'guard-rspec' # run specs automatically in background
gem 'guard-spork', '~> 0.5.2'
gem 'rb-fsevent'
gem 'growl'
gem 'rspec-core', '2.7.0'
gem 'rspec-rails', '2.7.0'
gem 'simplecov' # test coverage
gem 'factory_girl', '2.3.2', :require => false
gem 'factory_girl_rails', '~> 1.4', :require => false # better fixtures
gem 'capybara' # better request tests with rspec
gem 'capybara-json', '~> 0.2.0'
gem 'launchy'
end
My GET requests specs are working fine. Redirecting to the omniauth-callback and so on.
Now i wanted to test my first POST request that i'm using as a backend api for the flash client. In my requests spec i just get a "401 Unauthorized" when calling this post request.
Can someone please help me out? Did i forget something? Why are my GET requests working fine but the POST doesn't?
Thanks in advance