I ran bundle update and now my server is throwing the following error:
rails s
/Users/toptier/.rvm/gems/ruby-1.9.3-p194#global/gems/bundler-1.1.5/lib/bundler/runtime.rb:77:in `rescue in rescue in block in require': undefined method `gsub' for nil:NilClass (NoMethodError)
from /Users/toptier/.rvm/gems/ruby-1.9.3-p194#global/gems/bundler-1.1.5/lib/bundler/runtime.rb:72:in `rescue in block in require'
from /Users/toptier/.rvm/gems/ruby-1.9.3-p194#global/gems/bundler-1.1.5/lib/bundler/runtime.rb:62:in `block in require'
from /Users/toptier/.rvm/gems/ruby-1.9.3-p194#global/gems/bundler-1.1.5/lib/bundler/runtime.rb:55:in `each'
from /Users/toptier/.rvm/gems/ruby-1.9.3-p194#global/gems/bundler-1.1.5/lib/bundler/runtime.rb:55:in `require'
from /Users/toptier/.rvm/gems/ruby-1.9.3-p194#global/gems/bundler-1.1.5/lib/bundler.rb:119:in `require'
from /Users/toptier/Desktop/Projects/bestapp/config/application.rb:9:in `<top (required)>'
from /Users/toptier/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.2/lib/rails/commands.rb:53:in `require'
from /Users/toptier/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.2/lib/rails/commands.rb:53:in `block in <top (required)>'
from /Users/toptier/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.2/lib/rails/commands.rb:50:in `tap'
from /Users/toptier/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.2/lib/rails/commands.rb:50:in `<top (required)>'
from script/rails:31:in `require'
from script/rails:31:in `<main>'
The line application.rb:9 is :
Bundler.require(*Rails.groups(:assets => %w(development test)))
This are my list of gems:
source 'https://rubygems.org'
gem 'rails', '3.2.2'
gem 'pg'
gem 'thin'
gem 'eventmachine'
group :development do
gem 'ruby-debug-base19'
gem 'ruby-debug-ide'
gem 'sqlite3'
end
gem 'sass-rails', '~> 3.2.3'
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'coffee-rails', '~> 3.2.1'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer'
gem 'uglifier', '>= 1.0.3'
end
gem "rails_config"
gem 'unicorn'
gem 'delayed_job_active_record'
gem 'rest-client'
gem 'httparty'
gem 'em-http-request'
gem 'devise'
gem 'paperclip'
gem 'activeadmin'
gem "meta_search", '>= 1.1.0.pre'
gem 'aws-s3', :require => 'aws/s3'
gem 'aws-sdk';
gem 'jquery-rails'
gem 'mysql2'
gem 'imgkit'
gem 'websnap'
gem 'randumb'
gem 'heroku'
gem 'newrelic_rpm'
gem 'annotate',
:git => 'git://github.com/jeremyolliver/annotate_models.git',
:branch => 'rake_compatibility'
gem 'tinymce-rails'
gem 'mail'
The server is Thin
Any help?
try running
bundle exec rails s
Related
Didn't find any solution for this. I'm getting require: cannot load such file -- guard/guard (LoadError) error when i'm trying to start rails server.
ruby -v
ruby 2.1.2p95 (2014-05-08) [x86_64-linux-gnu]
rails -v
Rails 4.2.0
gem -v
2.2.2
That's my gem file:
[...]
group :development, :test do
gem "pry-rails"
# Guard
gem 'guard-rspec'
gem 'guard-spinach'
# Testing
gem 'minitest'
gem 'turn'
gem 'capybara'
gem 'rspec-rails'
gem 'spinach-rails'
gem 'libnotify'
gem 'awesome_print'
# Spring bindings
gem 'spring'
gem 'spring-commands-rspec'
gem 'spring-commands-spinach'
end
[...]
And running dev server does not work:
rails server
/home/sl/Dev/nexis-development-kit/nexis/vendor/bundle/ruby/2.1.0/gems/guard-spinach-0.0.3/lib/guard/spinach.rb:2:in `require': cannot load such file -- guard/guard (LoadError)
from /home/sl/Dev/nexis-development-kit/nexis/vendor/bundle/ruby/2.1.0/gems/guard-spinach-0.0.3/lib/guard/spinach.rb:2:in `<top (required)>'
from /var/lib/gems/2.1.0/gems/bundler-1.8.2/lib/bundler/runtime.rb:85:in `require'
from /var/lib/gems/2.1.0/gems/bundler-1.8.2/lib/bundler/runtime.rb:85:in `rescue in block in require'
from /var/lib/gems/2.1.0/gems/bundler-1.8.2/lib/bundler/runtime.rb:68:in `block in require'
from /var/lib/gems/2.1.0/gems/bundler-1.8.2/lib/bundler/runtime.rb:61:in `each'
from /var/lib/gems/2.1.0/gems/bundler-1.8.2/lib/bundler/runtime.rb:61:in `require'
from /var/lib/gems/2.1.0/gems/bundler-1.8.2/lib/bundler.rb:134:in `require'
from /home/sl/Dev/nexis-development-kit/nexis/config/application.rb:15:in `<top (required)>'
from /home/sl/Dev/nexis-development-kit/nexis/vendor/bundle/ruby/2.1.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:78:in `require'
from /home/sl/Dev/nexis-development-kit/nexis/vendor/bundle/ruby/2.1.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:78:in `block in server'
from /home/sl/Dev/nexis-development-kit/nexis/vendor/bundle/ruby/2.1.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:75:in `tap'
from /home/sl/Dev/nexis-development-kit/nexis/vendor/bundle/ruby/2.1.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:75:in `server'
from /home/sl/Dev/nexis-development-kit/nexis/vendor/bundle/ruby/2.1.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
from /home/sl/Dev/nexis-development-kit/nexis/vendor/bundle/ruby/2.1.0/gems/railties-4.2.0/lib/rails/commands.rb:17:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
When i comment out #gem 'guard-spinach' it works fine, though.
I've installed my gems using bundle install --path vendor/bundle
No simple answer for this one.
I figured out some versions setup. Probably, that's not the best one, but it works.
group :development, :test do
gem 'pry-rails'
# Guard
gem 'guard', '~> 2.2.4'
gem 'guard-rspec', '~> 4.2.0'
gem 'guard-spinach', '~> 0.0.2'
gem 'rspec-rails', '~> 2.99'
gem 'spinach-rails', '~> 0.2.1'
# Testing
gem 'minitest'
gem 'turn'
gem 'capybara'
gem 'libnotify'
gem 'awesome_print'
# Spring bindings
gem 'spring'
gem 'spring-commands-rspec'
gem 'spring-commands-spinach'
end
I just upgraded to Mac OSX Mavericks and to Ruby 1.9.3-p392 and now when I try to run rails s in one of my app I get the following error:
=> Booting WEBrick
=> Rails 3.2.13 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
Exiting
/Users/titouanvanbelle/.rvm/gems/ruby-1.9.3-p392/gems/actionpack-3.2.13/lib/action_dispatch/middleware/stack.rb:43:in `build': undefined method `new' for ExceptionNotifier:Module (NoMethodError)
from /Users/titouanvanbelle/.rvm/gems/ruby-1.9.3-p392/gems/actionpack-3.2.13/lib/action_dispatch/middleware/stack.rb:113:in `block in build'
from /Users/titouanvanbelle/.rvm/gems/ruby-1.9.3-p392/gems/actionpack-3.2.13/lib/action_dispatch/middleware/stack.rb:113:in `each'
from /Users/titouanvanbelle/.rvm/gems/ruby-1.9.3-p392/gems/actionpack-3.2.13/lib/action_dispatch/middleware/stack.rb:113:in `inject'
from /Users/titouanvanbelle/.rvm/gems/ruby-1.9.3-p392/gems/actionpack-3.2.13/lib/action_dispatch/middleware/stack.rb:113:in `build'
from /Users/titouanvanbelle/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/engine.rb:470:in `app'
from /Users/titouanvanbelle/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/application/finisher.rb:31:in `block in <module:Finisher>'
from /Users/titouanvanbelle/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/initializable.rb:30:in `instance_exec'
from /Users/titouanvanbelle/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/initializable.rb:30:in `run'
from /Users/titouanvanbelle/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/initializable.rb:55:in `block in run_initializers'
from /Users/titouanvanbelle/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/initializable.rb:54:in `each'
from /Users/titouanvanbelle/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/initializable.rb:54:in `run_initializers'
from /Users/titouanvanbelle/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/application.rb:136:in `initialize!'
from /Users/titouanvanbelle/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/railtie/configurable.rb:30:in `method_missing'
from /Users/titouanvanbelle/Documents/workspace/paymy/config/environment.rb:5:in `<top (required)>'
from /Users/titouanvanbelle/.rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
from /Users/titouanvanbelle/.rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `block in require'
from /Users/titouanvanbelle/.rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in `load_dependency'
from /Users/titouanvanbelle/.rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
from /Users/titouanvanbelle/Documents/workspace/paymy/config.ru:3:in `block in <main>'
from /Users/titouanvanbelle/.rvm/gems/ruby-1.9.3-p392/gems/rack-1.4.5/lib/rack/builder.rb:51:in `instance_eval'
from /Users/titouanvanbelle/.rvm/gems/ruby-1.9.3-p392/gems/rack-1.4.5/lib/rack/builder.rb:51:in `initialize'
from /Users/titouanvanbelle/Documents/workspace/paymy/config.ru:in `new'
from /Users/titouanvanbelle/Documents/workspace/paymy/config.ru:in `<main>'
from /Users/titouanvanbelle/.rvm/gems/ruby-1.9.3-p392/gems/rack-1.4.5/lib/rack/builder.rb:40:in `eval'
from /Users/titouanvanbelle/.rvm/gems/ruby-1.9.3-p392/gems/rack-1.4.5/lib/rack/builder.rb:40:in `parse_file'
from /Users/titouanvanbelle/.rvm/gems/ruby-1.9.3-p392/gems/rack-1.4.5/lib/rack/server.rb:200:in `app'
from /Users/titouanvanbelle/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/commands/server.rb:46:in `app'
from /Users/titouanvanbelle/.rvm/gems/ruby-1.9.3-p392/gems/rack-1.4.5/lib/rack/server.rb:304:in `wrapped_app'
from /Users/titouanvanbelle/.rvm/gems/ruby-1.9.3-p392/gems/rack-1.4.5/lib/rack/server.rb:254:in `start'
from /Users/titouanvanbelle/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/commands/server.rb:70:in `start'
from /Users/titouanvanbelle/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/commands.rb:55:in `block in <top (required)>'
from /Users/titouanvanbelle/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/commands.rb:50:in `tap'
from /Users/titouanvanbelle/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/commands.rb:50:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
This is my Gemfile:
source 'https://rubygems.org'
gem 'rails', '3.2.13'
gem 'bcrypt-ruby', "3.0.1"
# Database support:
gem 'pg'
# Use native JSON extension:
gem 'json'
# Use RABL to build API responses:
gem 'rabl'
# HTML parsing for press page
gem 'nokogiri'
# Authentication & authorization:
gem 'omniauth-facebook'
gem 'consul'
gem 'omniauth-identity'
# Pagination
gem 'will_paginate'
gem 'will_paginate-bootstrap'
gem 'foundation-will_paginate'
# Facebook
gem 'koala'
# Utility
gem 'modularity'
gem 'has_defaults'
gem 'andand'
gem 'gibberish'
gem 'state_machine'
gem 'exception_notification'
gem 'edge_rider'
gem 'rest-client'
gem 'haml-rails'
gem 'bootstrap-sass', '~> 2.1.1.0'
gem 'zurb-foundation', '~> 4.1.6'
gem 'compass-rails'
gem 'jquery-rails'
gem 'inherited_resources'
# GUI
gem 'simple_form'
# background processing
gem 'delayed_job_active_record'
# Payment
gem 'king_dtaus'
group :deploy do
# cron
gem 'whenever', require: false
end
# Gems used for development and testing
# and not required in production.
group :development, :test do
gem 'machinist', '<2'
gem 'machinist_callbacks'
gem 'faker'
gem 'rspec-rails'
gem 'cucumber-rails', require: false
gem 'cucumber_factory'
gem 'database_cleaner'
gem 'timecop'
gem 'capybara', '<2'
gem 'spreewald'
gem 'cucumber_spinner'
gem 'launchy'
gem 'rspec_candy'
gem 'pry'
gem 'debugger'
gem 'quiet_assets'
gem 'letter_opener'
gem 'poltergeist'
gem 'guard-rspec'
gem 'guard-cucumber'
gem 'parallel_tests'
end
group :test do
gem 'shoulda-matchers'
end
# Gems used only for assets and not required
# in production environments by default.
# group :assets do
# gem 'sass-rails'
# gem 'coffee-rails'
# gem 'uglifier'
# end
group :assets do
gem 'sass-rails', '~> 3.1'
gem 'coffee-rails', '~> 3.2.1'
gem 'uglifier', '>= 1.0.3'
gem 'execjs'
gem 'therubyracer'
end
group :development do
gem 'better_errors'
gem 'meta_request'
gem 'binding_of_caller'
gem 'ruby-graphviz', '<= 1.0.8'
end
# Sencha theming with compass:
gem 'compass', group: :development
group :deployment do
gem 'capistrano'
gem 'capistrano_colors'
gem 'rvm-capistrano'
end
group :server do
gem 'god'
gem 'daemons'
end
Versions I am using are:
Ruby: ruby-1.9.3-p392
Rails: Rails 3.2.13
Not sure what else to tell you, but just ask. I'll add as much information as I can.
The issue is with "exception_notification" gem, you have had updated to version 4.x.
You must change: YOUR_APP::Application.config.middleware.use ExceptionNotifier
to
YOUR_APP::Application.config.middleware.use ExceptionNotification::Rack
More info: https://github.com/smartinez87/exception_notification#upgrading-to-4x-version
I've successfully deployed a Rails 4 app via Capistrano from a MS Windows 7 machine to an Ubuntu 13.04 server setup with Nginx and passenger. However, I've come across this error (rather long) on page load (error below).
Has anyone else come across this error and know how to resolve it? My localhost works great in both development and production. I've Google and found that the cannot load such file -- nokogiri (LoadError) happens for different reasons but with no clear resolution.
Note: the bottom half of the error file needed to be chopped due to character limit.
Gem file:
source 'https://rubygems.org'
ruby '2.0.0'
gem 'rails', '4.0.0'
gem 'rake', '10.1.0'
gem 'sqlite3', '1.3.8'
gem 'sass-rails', '~> 4.0.0'
gem "actionpack", '~> 4.0.0'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.0.0'
gem 'modernizr', '~> 2.6.2'
gem 'therubyracer', platforms: :ruby
gem 'jquery-rails', '3.0.4'
gem 'turbolinks', '1.3.0'
gem 'jbuilder', '~> 1.2'
gem 'nokogiri'
#Spree
gem 'spree', github: 'spree/spree'
gem 'spree_auth_devise', github: 'spree/spree_auth_devise'
gem 'ransack', github: 'ernie/ransack'
gem 'awesome_nested_set', github: 'collectiveidea/awesome_nested_set'
# Spree Payment Methods
gem 'spree_gateway', github: 'spree/spree_gateway'
# Spree Shipping Methods
gem 'spree_active_shipping', :git => "git://github.com/spree/spree_active_shipping"
group :doc do
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', require: false
end
gem 'debugger', group: [:development, :test]
group :production, :staging do
gem 'capistrano', '2.15.5'
gem 'mysql2', '0.3.13'
end
Error on page load:
cannot load such file -- nokogiri (LoadError)
/home/deploy/clientsite_staging/shared/bundle/ruby/2.0.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `require'
/home/deploy/clientsite_staging/shared/bundle/ruby/2.0.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `block in require'
/home/deploy/clientsite_staging/shared/bundle/ruby/2.0.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:213:in `load_dependency'
/home/deploy/clientsite_staging/shared/bundle/ruby/2.0.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `require'
/home/deploy/clientsite_staging/shared/bundle/ruby/2.0.0/gems/deface-1.0.0.rc4/lib/deface/parser.rb:1:in `<top (required)>'
/home/deploy/clientsite_staging/shared/bundle/ruby/2.0.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `require'
/home/deploy/clientsite_staging/shared/bundle/ruby/2.0.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `block in require'
/home/deploy/clientsite_staging/shared/bundle/ruby/2.0.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:213:in `load_dependency'
/home/deploy/clientsite_staging/shared/bundle/ruby/2.0.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `require'
/home/deploy/clientsite_staging/shared/bundle/ruby/2.0.0/gems/deface-1.0.0.rc4/lib/deface.rb:8:in `<top (required)>'
/home/deploy/clientsite_staging/shared/bundle/ruby/2.0.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `require'
/home/deploy/clientsite_staging/shared/bundle/ruby/2.0.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `block in require'
....[a lot more error file]...
SOLVED!
It was because the gem #gem 'bcrypt-ruby', '~> 3.0.0' was commented out. It gave another error when I uncommented that gem so I researched and found that replacing it with gem 'bcrypt-ruby', git: 'https://github.com/codahale/bcrypt-ruby.git', :require => 'bcrypt' works thanks to https://stackoverflow.com/a/17406994/2758139. I am now able to deploy and see the page load.
I am trying to rake db:migrate. I cloned a repository and tried to rake db:migrate, but get this error :
rake aborted!
Unable to determine name from existing gemspec. Use :name => 'gemname' in #inst
ll_tasks to manually set it. C:/Users/Dila/Documents/emo_project/Rakefile:6:in `<top (required)>'
In my Rakefile line 6, I have this :
require "bundler/gem_tasks"
This is what I got, when I trace it :
C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.2.1/lib/bundler/gem_helper.rb:30:i
n `initialize'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.2.1/lib/bundler/gem_helper.rb:14:i
n `new'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.2.1/lib/bundler/gem_helper.rb:14:i
n `install_tasks'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.2.1/lib/bundler/gem_tasks.rb:2:in
`<top (required)>'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.2/lib/active_support/depen
dencies.rb:251:in `require'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.2/lib/active_support/depen
dencies.rb:251:in `block in require'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.2/lib/active_support/depen
dencies.rb:236:in `load_dependency'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.2/lib/active_support/depen
dencies.rb:251:in `require'
C:/Users/Dila/Documents/emo_project/Rakefile:6:in `<top (required)>'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.0.4/lib/rake/rake_module.rb:25:in `l
oad'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.0.4/lib/rake/rake_module.rb:25:in `l
oad_rakefile'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:589:in `
raw_load_rakefile'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:89:in `b
lock in load_rakefile'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:160:in `
standard_exception_handling'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:88:in `l
oad_rakefile'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:72:in `b
lock in run'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:160:in `
standard_exception_handling'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:70:in `r
un'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.0.4/bin/rake:33:in `<top (required)>
'
C:/Ruby193/bin/rake:23:in `load'
C:/Ruby193/bin/rake:23:in `<main>'
I have no idea what is went wrong, because yesterday I was working in my office and everything was ok. I just wanna try to clone the repository in my laptop, but it doesn't work.
my gemfile :
source 'https://rubygems.org'
if RUBY_VERSION =~ /1.9/
Encoding.default_external = Encoding::UTF_8
Encoding.default_internal = Encoding::UTF_8
end
group :production do
gem 'pg', '0.12.2'
end
gem 'magic_encoding'
gem 'rails', '3.2.2'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'sqlite3'
gem 'activeadmin'
gem "bcrypt-ruby", :require => "bcrypt"
# to copy to clipboard
gem 'zeroclipboard-rails'
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'coffee-rails', '~> 3.2.1'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
#gem 'therubyracer'
gem 'uglifier', '>= 1.0.4'
gem 'sass-rails', '~> 3.2'
gem 'bootstrap-sass', '~> 2.3.1.0'
gem 'closure-compiler'
end
gem 'jquery-rails'
I see in your gemfile that you set postgresql as your production database, however you also set sqlite to run on production, test, and development.
group :production do
gem 'pg', '0.12.2'
end
# Skip some lines to here
gem 'sqlite3'
I would make sure your database is uniform across the test, development, and production servers. I would remove sqlite3 and simply have
group :production do
gem 'pg', '0.12.2'
end
replaced with
gem 'pg', '0.12.2'
That way, postgresql will run on all platforms. Or if your database.yml is connected to sqlite, then get rid of postgresql and keep the sqlite gem in your gemfile.
After my upgrade to Rails 3.1.3 and Ruby 1.9.3 (via RVM) i can't normally run autotest. I don't know what has happened, but when i print:
$ autotest
It shows strange error
loading autotest/rails_rspec2
/Users/serg/.rvm/rubies/ruby-1.9.3-head/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:55:in `require': cannot load such file -- autotest/fsevent (LoadError)
from /Users/serg/.rvm/rubies/ruby-1.9.3-head/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:55:in `require'
from /Users/serg/rails_projects_terminal/sample_app/.autotest:2:in `<top (required)>'
from /Users/serg/.rvm/gems/ruby-1.9.3-head#global/gems/ZenTest-4.6.2/lib/autotest.rb:315:in `load'
from /Users/serg/.rvm/gems/ruby-1.9.3-head#global/gems/ZenTest-4.6.2/lib/autotest.rb:315:in `block in initialize'
from /Users/serg/.rvm/gems/ruby-1.9.3-head#global/gems/ZenTest-4.6.2/lib/autotest.rb:314:in `each'
from /Users/serg/.rvm/gems/ruby-1.9.3-head#global/gems/ZenTest-4.6.2/lib/autotest.rb:314:in `initialize'
from /Users/serg/.rvm/gems/ruby-1.9.3-head/gems/rspec-core-2.8.0/lib/autotest/rspec2.rb:13:in `initialize'
from /Users/serg/.rvm/gems/ruby-1.9.3-head/gems/rspec-rails-2.8.0/lib/autotest/rails_rspec2.rb:31:in `initialize'
from /Users/serg/.rvm/gems/ruby-1.9.3-head#global/gems/ZenTest-4.6.2/lib/autotest.rb:244:in `new'
from /Users/serg/.rvm/gems/ruby-1.9.3-head#global/gems/ZenTest-4.6.2/lib/autotest.rb:244:in `run'
from /Users/serg/.rvm/gems/ruby-1.9.3-head#global/gems/ZenTest-4.6.2/bin/autotest:6:in `<top (required)>'
from /Users/serg/.rvm/gems/ruby-1.9.3-head#global/bin/autotest:19:in `load'
from /Users/serg/.rvm/gems/ruby-1.9.3-head#global/bin/autotest:19:in `<main>'
But when i try:
bundle exec autotest
It works. How can i fix it?
My gemfile:
source 'http://rubygems.org'
gem 'rails', '3.1.3'
gem 'gravatar_image_tag'
gem 'will_paginate'
gem 'rack'
gem 'texticle', "2.0", :require => 'texticle/rails'
group :assets do
gem 'sass-rails'
gem 'coffee-rails'
gem 'uglifier'
end
gem 'jquery-rails'
group :development do
gem 'rspec-rails'
gem 'therubyracer-heroku'
gem 'pg'
gem 'annotate', :git => 'git://github.com/ctran/annotate_models.git'
gem 'faker'
end
group :test do
gem 'rspec-rails'
gem 'webrat'
gem 'spork'
gem 'autotest'
gem 'autotest-rails-pure'
gem 'autotest-fsevent'
gem 'autotest-growl'
gem 'factory_girl_rails'
end
group :production do
gem 'pg'
end
I had that issue as well, and to fix it I had to do what you did :
$ gem update ZenTest
$ gem cleanup ZenTest
$ gem install autotest-fsevent
But I also had to add 'autotest-growl' and 'autotest-fsevent' to my gemfile, which now looks like this:
group :development do
gem 'sqlite3'
gem 'rspec-rails'
gem 'autotest'
gem 'ZenTest'
gem 'autotest-growl'
gem 'autotest-fsevent'
end
Then
$ Bundle install
And now
$ autotest
works just fine :)
I solved it. I found this page: http://www.viget.com/extend/how-why-to-run-autotest-on-your-mac/
and then i printed in the Terminal:
$ gem update ZenTest
$ gem cleanup ZenTest
$ gem install autotest-fsevent
After that autotest started to work fine.