My Rails Console stopped working:
$ rails c
Could not find rake-10.2.2 in any of the sources
Run `bundle install` to install missing gems.
You'd think running bundle install or bundle update would work, but nope! What baffles me is that I'm not using rake 10.2.2 and it's not in gemfile.lock. I'm using rake 10.3.2
Running via bundle exec rails console RAILS_ENV=development returns same error.
Trying gem install rake -v 10.2.2 improved the situation only mildly. Now it's looking for a different gem that I'm not using:
$ rails c
Could not find i18n-0.6.9 in any of the sources
Run `bundle install` to install missing gems.
Again...bundle install is just fine. Odder still, rails s works fine and rake tasks are fine. I just can't use the console!
$ bundle install
Using rake 10.3.2
Using i18n 0.6.11
Using json 1.8.1
Using minitest 5.4.2
Using thread_safe 0.3.4
Using tzinfo 1.2.2
Using activesupport 4.1.6
Using builder 3.2.2
Using erubis 2.7.0
Using actionview 4.1.6
Using rack 1.5.2
Using rack-test 0.6.2
Using actionpack 4.1.6
Using mime-types 2.3
Using mail 2.6.1
Using actionmailer 4.1.6
Using arbre 1.0.2
Using sass 3.2.19
Using thor 0.19.1
Using bourbon 3.2.3
Using coffee-script-source 1.8.0
Using execjs 2.2.1
Using coffee-script 2.3.0
Using railties 4.1.6
Using coffee-rails 4.0.1
Using formtastic 3.0.0
Using has_scope 0.6.0.rc
Using responders 1.0.0
Using inherited_resources 1.4.1
Using jquery-rails 3.1.2
Using jquery-ui-rails 5.0.0
Using kaminari 0.16.1
Using activemodel 4.1.6
Using arel 5.0.1.20140414130214
Using activerecord 4.1.6
Using bundler 1.7.3
Using hike 1.2.3
Using multi_json 1.10.1
Using tilt 1.4.1
Using sprockets 2.11.0
Using sprockets-rails 2.1.4
Using rails 4.1.6
Using polyamorous 1.1.0
Using ransack 1.4.1
Using sass-rails 4.0.3
Using activeadmin 1.0.0.pre from git://github.com/activeadmin/activeadmin.git (at master)
Using addressable 2.3.6
Using bcrypt 3.1.7
Using bootstrap-sass 3.2.0.2
Using mini_portile 0.6.0
Using nokogiri 1.6.3.1
Using xpath 2.0.0
Using capybara 2.4.3
Using timers 1.1.0
Using celluloid 0.15.2
Using coderay 1.1.0
Using database_cleaner 1.3.0
Using orm_adapter 0.5.0
Using warden 1.2.3
Using devise 3.3.0
Using diff-lcs 1.2.5
Using launchy 2.4.2
Using email_spec 1.6.0
Using excon 0.39.6
Using factory_girl 4.4.0
Using factory_girl_rails 4.4.1
Using ffi 1.9.5
Using figaro 1.0.0
Using formatador 0.2.5
Using friendly_id 5.0.4
Using multi_xml 0.5.5
Using httparty 0.13.1
Using gibbon 1.0.4
Using rb-fsevent 0.9.4
Using rb-inotify 0.9.5
Using listen 2.7.11
Using lumberjack 1.0.9
Using method_source 0.8.2
Using slop 3.6.0
Using pry 0.10.1
Using guard 2.6.1
Using rspec-support 3.1.1
Using rspec-core 3.1.4
Using rspec-expectations 3.1.2
Using rspec-mocks 3.1.2
Using rspec 3.1.0
Using guard-rspec 4.3.1
Using haml 4.0.5
Using haml-rails 0.5.3
Using heroku-api 0.3.19
Using heroku_san 4.3.2
Using jbuilder 1.5.3
Using turbolinks 2.3.0
Using jquery-turbolinks 2.1.0
Using netrc 0.7.7
Using newrelic_rpm 3.9.4.245
Using pg 0.17.0
Using rails_serve_static_assets 0.0.2
Using rails_stdout_logging 0.0.3
Using rails_12factor 0.0.2
Using recaptcha 0.3.6
Using rest-client 1.7.2
Using rspec-rails 3.1.0
Using shoulda-matchers 2.7.0 from git://github.com/thoughtbot/shoulda-matchers.git (at master)
Using spring 1.1.3
Using spring-commands-rspec 1.0.2
Using sqlite3 1.3.8
Using streak_client 0.0.0 from git://github.com/yetanothernguyen/streak_client.git (at master)
Using sucker_punch 1.2.1
Using uglifier 2.5.3
Your bundle is complete!
Use `bundle show [gemname]` to see where a bundled gem is installed.
Answer suggested to me via Twitter worked:
Step 1) Delete gemset and reinstall
This didn't get me running, but it at least got the console talking to the right gemset. But the console was still hanging.
Interrupting the console showed an error with spring.
This question suggested I stop spring: ruby on rails console hanging when loading
bin/spring stop
Everything is working!
Run this
bundle exec rails console RAILS_ENV=development
Related
I am fairly sure that this is a PATH issue, but I am at the end of my rope trying to solve it. Hopefully one of the wizards will be able to help. Here's some relevant information:
System: Ubuntu 16.04 LTS running on Cloud
Environment Manager: Chef 12.21.3
rbenv version 0.4.0 installed via Chef ruby_rbenv cookbook
bundler version: 1.15.1 installed via ruby_rbenv LWRP systemwide
libpq-dev: INSTALLED
ruby-build: INSTALLED
PostGreSQL-9.5: INSTALLED
Alterations to .bashrc? NO
Alterations to PATH in capistrano? NO
Thus far I have been able to do everything through set directives in capistrano
And now the fun stuff
Gemfile
source 'https://rubygems.org'
ruby '2.3.4'
# admin UI gem
gem "activeadmin", :github => "activeadmin"
# This was the default encoder used by ActiveSupport prior to Rails 4.1
gem 'activesupport-json_encoder'
# Error handling gem, leave on v4, migration effort required to go to v5
gem 'airbrake', '4.3.6'
# AngularJS-style CSRF Protection for Rails
gem 'angular_rails_csrf'
# Required by 'has_secure_password'
gem 'bcrypt-ruby'
# Remote site scripting
gem 'capybara'
# Use CoffeeScript for .js.coffee assets and views
gem 'coffee-rails'
# user authentication
gem 'devise'
# http library for api requests
gem 'faraday_middleware'
# forecast.io weather API
gem 'forecast_io'
# Find lat/long of businesses, currently just used for weather lookups.
gem 'geocoder'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder'
# email handling
gem 'mail'
# Facilitates communciation with Redis
gem 'message_bus'
# JS based charting library
gem 'morrisjs-rails'
# site performance monitoring
gem 'newrelic_rpm'
# html/xml parser
gem 'nokogiri'
# A Ruby wrapper for the OAuth 2.0 specification.
gem 'oauth2'
# Use Postgresql as the database for Active Record
gem 'pg'
# Application server
gem 'puma'
# PhantomJS in the gemfile for access through bundle exec
gem 'phantomjs', :require => 'phantomjs/poltergeist'
# JS based scripting gem for Capybara
gem 'poltergeist'
# force ssl connection
gem 'rack-ssl-enforcer'
# JS vector graphics
gem 'raphael-rails'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 4.2.6'
# Use SCSS for stylesheets
gem 'sass-rails'
# Background job processing
gem 'sidekiq'
# process monthly payments
gem 'stripe'
# allow switching between users
gem 'switch_user'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier'
gem 'redis-namespace'
gem 'yelp'
gem 'net-ssh'
gem 'fast-stemmer'
# bundle exec rake doc:rails generates the API under doc/api.
group :doc do
gem 'sdoc', '~> 0.4.0'
end
group :development do
# These two gems let us send exceptions to slack, if configured.
gem 'exception_notification'
gem 'slack-notifier'
gem 'capistrano'
gem 'capistrano-rbenv'
gem 'capistrano-bundler'
gem 'capistrano-rails'
gem 'capistrano3-puma'
gem 'capistrano-sidekiq'
gem 'capistrano-faster-assets'
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring'
# suppress asset pipeline logs
gem 'quiet_assets'
# Generates ERDs with 'rake erd'
gem 'rails-erd'
# load env variables from .env file
gem 'dotenv-rails'
# debugging gems
gem 'better_errors'
gem 'binding_of_caller'#, platforms: [:mri_19, :mri_20, :rbx]
gem 'pry-byebug'
gem 'pry-doc'
gem 'pry-rails'
gem 'pry-remote'
end
group :test do
gem 'database_cleaner'
gem 'email_spec'
gem 'factory_girl_rails'
gem 'faker'
gem 'rspec-rails'
gem 'timecop'
end
group :production do
end
Capfile
# Load DSL and set up stages
require "capistrano/setup"
# Include default deployment tasks
require "capistrano/deploy"
# Make sure that we have the library for rails included
require "capistrano/rails"
# Since we use Sidekiq, we need to gracefully stop processing jobs
# during a new deployment, and start accepting jobs when the deployment
# is complete as worker logic might change.
require "capistrano/sidekiq"
# Puma Requirements.
require 'capistrano/puma'
# Dynamic NGINX configuration
require 'capistrano/puma/nginx'
# We use rbenv
require 'capistrano/rbenv'
# We use Bundler
require 'capistrano/bundler'
# Configure Capistrano to use GIT for project management
require "capistrano/scm/git"
install_plugin Capistrano::SCM::Git
# Load custom tasks from `lib/capistrano/tasks` if you have any defined
Dir.glob("lib/capistrano/tasks/*.rake").each { |r| import r }
Relevant Deploy Information
set :rbenv_type, :system
set :bundle_flags, "--deployment --quiet --binstubs --shebang ruby-local-exec"
set :bundle_path, -> { shared_path.join('bundle') }
set :linked_files, %w{config/database.yml}
# Even in staging, we're testing against the production settings... that's the point.
set :rails_env, :production
# clean up old assets after each deploy,
# set this to the number of versions to keep
set :keep_assets, 2
# Rails handles this through its framework migrations.
set :migration_role, :app
# Defaults to the primary :db server
# However, by setting it up like this, the role handling the migration is the one that runs
# the rake db:migrate command.
set :migration_servers, -> { primary(fetch(:migration_role)) }
set :conditionally_migrate, true
set :assets_roles, [:web]
# Defaults to 'assets'
# This should match config.assets.prefix in your rails config/application.rb
# ... but we don't have that configuration option set. A lot of reading I did pointed
# to the inclusion of this command, but I am going to leave it out on the premise that
# we do not have the config.assets.prefix set for a good reason. If this changes,
# then uncomment the following line:
# set :assets_prefix, 'prepackaged-assets'
# If you need to touch public/images, public/javascripts, and public/stylesheets on each deploy
#set :normalize_asset_timestamps, %w{public/images public/javascripts public/stylesheets}
The Problem
01 /usr/local/rbenv/bin/rbenv exec bundle install --path <OMITTED>/shared/bundle --without development test --deployment --quiet --binstubs --shebang ruby-local-exec
** DEPLOY FAILED
** Refer to log/capistrano.log for details. Here are the last (more than 20) lines:
/usr/local/rbenv/bin/rbenv exec bundle install --path <OMITTED>/shared/bundle --without development test --deployment --quiet --binstubs --shebang ruby-local-exec
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory:
<OMITTED>/shared/bundle/ruby/2.3.0/gems/pg-0.18.4/ext
/usr/local/rbenv/versions/2.3.4/bin/ruby -r ./siteconf20170711-55875-b7vll7.rb
extconf.rb --with-pg_config=/usr/bin/pg_config
Using config values from /usr/bin/pg_config
sh: 1: /usr/bin/pg_config: not found
sh: 1: /usr/bin/pg_config: not found
checking for libpq-fe.h... no
Can't find the 'libpq-fe.h header
*** extconf.rb failed ***
<SNIP>
extconf failed, exit code 1
Gem files will remain installed in
<OMITTED>/shared/bundle/ruby/2.3.0/gems/pg-0.18.4 for inspection.
Results logged to
<OMITTED>/shared/bundle/ruby/2.3.0/extensions/x86_64-linux/2.3.0-static/pg-0.18.4/gem_make.out
An error occurred while installing pg (0.18.4), and Bundler cannot continue.
Make sure that `gem install pg -v '0.18.4'` succeeds before bundling.
In Gemfile:
pg
MKMF.log
Relevant:
find_executable: checking for pg_config... -------------------- yes
--------------------
find_header: checking for libpq-fe.h... -------------------- yes
< The rest of this is too large to put here. It is available on request>
gem_make.out
cat ./shared/bundle/ruby/2.3.0/extensions/x86_64-linux/2.3.0-static/pg-0.18.4/gem_make.out
current directory: <OMITTED>/shared/bundle/ruby/2.3.0/gems/pg-0.18.4/ext
/usr/local/rbenv/versions/2.3.4/bin/ruby -r ./siteconf20170707-35742-1cvk2th.rb extconf.rb
checking for pg_config... yes
Using config values from /usr/bin/pg_config
checking for libpq-fe.h... yes
checking for libpq/libpq-fs.h... yes
checking for pg_config_manual.h... yes
checking for PQconnectdb() in -lpq... yes
checking for PQconnectionUsedPassword()... yes
checking for PQisthreadsafe()... yes
checking for PQprepare()... yes
checking for PQexecParams()... yes
checking for PQescapeString()... yes
checking for PQescapeStringConn()... yes
checking for PQescapeLiteral()... yes
checking for PQescapeIdentifier()... yes
checking for PQgetCancel()... yes
checking for lo_create()... yes
checking for pg_encoding_to_char()... yes
checking for pg_char_to_encoding()... yes
checking for PQsetClientEncoding()... yes
checking for PQlibVersion()... yes
checking for PQping()... yes
checking for PQsetSingleRowMode()... yes
checking for PQconninfo()... yes
checking for rb_encdb_alias()... yes
checking for rb_enc_alias()... yes
checking for rb_thread_call_without_gvl()... yes
checking for rb_thread_call_with_gvl()... yes
checking for rb_thread_fd_select()... yes
checking for rb_w32_wrap_io_handle()... no
checking for rb_str_modify_expand()... yes
checking for rb_hash_dup()... yes
checking for PGRES_COPY_BOTH in libpq-fe.h... yes
checking for PGRES_SINGLE_TUPLE in libpq-fe.h... yes
checking for PG_DIAG_TABLE_NAME in libpq-fe.h... yes
checking for struct pgNotify.extra in libpq-fe.h... yes
checking for unistd.h... yes
checking for inttypes.h... yes
checking for ruby/st.h... yes
checking for C99 variable length arrays... yes
creating extconf.h
creating Makefile
To see why this extension failed to compile, please check the mkmf.log which can be found here:
<OMITTED>/shared/bundle/ruby/2.3.0/extensions/x86_64-linux/2.3.0-static/pg-0.18.4/mkmf.log
current directory: <OMITTED>/shared/bundle/ruby/2.3.0/gems/pg-0.18.4/ext
make "DESTDIR=" clean
current directory: <OMITTED>/shared/bundle/ruby/2.3.0/gems/pg-0.18.4/ext
make "DESTDIR="
compiling pg_type_map_by_mri_type.c
compiling pg_coder.c
compiling pg_type_map_by_column.c
compiling pg_result.c
compiling pg_type_map_in_ruby.c
compiling pg_errors.c
compiling pg.c
compiling util.c
compiling pg_type_map_by_class.c
compiling pg_copy_coder.c
compiling pg_type_map.c
compiling pg_text_encoder.c
compiling pg_binary_encoder.c
compiling pg_connection.c
pg_connection.c: In function ‘wait_socket_readable’:
pg_connection.c:2394:3: warning: implicit declaration of function ‘gettimeofday’ [-Wimplicit-function-declaration]
gettimeofday(&currtime, NULL);
^
compiling pg_type_map_all_strings.c
compiling pg_type_map_by_oid.c
compiling gvl_wrappers.c
compiling pg_text_decoder.c
compiling pg_binary_decoder.c
linking shared-object pg_ext.so
current directory: <OMITTED>/shared/bundle/ruby/2.3.0/gems/pg-0.18.4/ext
make "DESTDIR=" install
/usr/bin/install -c -m 0755 pg_ext.so ./.gem.20170707-35742-11dgneo
The Weirdness
dev#app-1:<OMITTED>/releases/20170711040154$ bundle install
The git source `git://github.com/activeadmin/activeadmin.git` uses the `git` protocol, which transmits data without encryption. Disable this warning with `bundle config git.allow_insecure true`, or switch to the `https` protocol to keep your data secure.
Fetching gem metadata from https://rubygems.org/........
Fetching version metadata from https://rubygems.org/...
Fetching dependency metadata from https://rubygems.org/..
Using rake 11.1.2
Using i18n 0.7.0
Using json 1.8.3
Using minitest 5.8.4
Using thread_safe 0.3.5
Using sass 3.4.22
Using thor 0.19.1
Using coffee-script-source 1.10.0
Using execjs 2.6.0
Using builder 3.2.2
Using erubis 2.7.0
Using mini_portile2 2.0.0
Using rack 1.6.4
Using formtastic_i18n 0.6.0
Using mime-types 2.99.1
Using arel 6.0.3
Using concurrent-ruby 1.0.1
Using bundler 1.15.1
Using tilt 2.0.2
Using multi_json 1.12.1
Using bcrypt 3.1.11
Using addressable 2.4.0
Using orm_adapter 0.5.0
Using multipart-post 2.0.0
Using hashie 3.4.6
Using geocoder 1.3.3
Using redis 3.2.2
Using newrelic_rpm 3.15.1.316
Using jwt 1.5.1
Using multi_xml 0.5.5
Using pg 0.18.4
Using puma 3.4.0
Using phantomjs 2.1.1.0
Using cliver 0.3.2
Using websocket-extensions 0.1.2
Using rack-ssl-enforcer 0.2.9
Using raphael-rails 2.1.2
Using connection_pool 2.2.0
Using unf_ext 0.0.7.2
Using netrc 0.11.0
Using switch_user 1.2.1
Using simple_oauth 0.3.1
Using net-ssh 3.1.1
Using fast-stemmer 1.0.2
Using rails_serve_static_assets 0.0.5
Using rails_stdout_logging 0.0.5
Using rdoc 4.2.2
Using tzinfo 1.2.2
Using bourbon 4.2.6
Using coffee-script 2.4.1
Using uglifier 3.0.0
Using nokogiri 1.6.7.2
Using rack-test 0.6.3
Using warden 1.2.6
Using mail 2.6.4
Using sprockets 3.6.0
Using airbrake 4.3.6
Using bcrypt-ruby 3.1.5
Using faraday 0.9.2
Using message_bus 1.1.1
Using redis-namespace 1.5.2
Using websocket-driver 0.6.3
Using sidekiq 4.1.1
Using unf 0.1.4
Using rails_12factor 0.0.3
Using sdoc 0.4.1
Using activesupport 4.2.6
Using loofah 2.0.3
Using xpath 2.0.0
Using faraday_middleware 0.10.0
Using forecast_io 2.0.1
Using oauth2 1.1.0
Using domain_name 0.5.20160310
Using arbre 1.0.3
Using rails-deprecated_sanitizer 1.0.3
Using globalid 0.3.6
Using activemodel 4.2.6
Using activesupport-json_encoder 1.1.0
Using jbuilder 2.4.1
Using rails-html-sanitizer 1.0.3
Using capybara 2.7.0
Using yelp 2.1.2
Using http-cookie 1.0.2
Using rails-dom-testing 1.0.7
Using activejob 4.2.6
Using activerecord 4.2.6
Using poltergeist 1.9.0
Using rest-client 1.8.0
Using actionview 4.2.6
Using polyamorous 1.3.0
Using stripe 1.42.0
Using actionpack 4.2.6
Using railties 4.2.6
Using formtastic 3.1.4
Using has_scope 0.6.0
Using kaminari 0.16.3
Using actionmailer 4.2.6
Using sprockets-rails 3.0.4
Using ransack 1.7.0
Using heroku_rails_deflate 1.0.3
Using coffee-rails 4.1.1
Using responders 2.1.2
Using jquery-rails 4.1.1
Using jquery-ui-rails 5.0.5
Using morrisjs-rails 0.5.1
Using rails 4.2.6
Using sass-rails 5.0.4
Using inherited_resources 1.6.0
Using devise 3.5.6
Using angular_rails_csrf 1.0.4
Using activeadmin 1.0.0.pre2 from git://github.com/activeadmin/activeadmin.git (at master#d84f819)
Bundle complete! 60 Gemfile dependencies, 111 gems now installed.
Gems in the groups development and test were not installed.
Bundled gems are installed into <OMITTED>/shared/bundle.
I truly am stumped on this. I have been attempting to get this machine configured for two days and have been able to get precisely nowhere.
Any help is appreciated.
Solution
This problem was related to Chef deploying rbenv and installing bundler along with executing the proper installation for ruby-build. The problem was solved by configuring a VM by hand and launching the deploy process at it.
You can try this command from server console:
sudo apt-get install libpq-dev build-essential postgresql-server-dev-9.5
And then try to do
gem install pg
im a noob. i need help.
im trying to install Redmine CRM plugin however im getting an error when i run this:
bundle install --without development test
it says:
Bundler could not find compatible versions for gem "i18n":
In Gemfile:
rails (= 4.2.0) ruby depends on
railties (= 4.2.0) ruby depends on
activesupport (= 4.2.0) ruby depends on
i18n (~> 0.7) ruby
money (~> 5.1.0) ruby depends on
i18n (~> 0.6.0) ruby
Redmine CRM plugin has to be upgraded to newer versions of redmine in parallel. I recommend to upgrade redmine first (with an empty plugins directory) and then add the redminecrm plugins and upgrade them too.
Redmine CRM Plugin 4.0.3 is compatible with Redmine 2.6-3.1
Older versions of the Redmine CRM Plugin installed on Redmine 3.1 result in the error you posted.
In your Gemfile, manually specify I18n gem like
gem 'I18n', '~0.6.0'
I am trying to deploy a rails 4 app to production with the rack attack middleware, but its erroring out during the load process.
[2014-06-26T17:00:10.247426 #30561] ERROR -- : uninitialized constant Rack::Attack (NameError)
/home/deploy/apps/dieuDonne/releases/20140626205924/config/application.rb:29:in `<class:Application>'
/home/deploy/apps/dieuDonne/releases/20140626205924/config/application.rb:12:in `<module:Wizard>'
/home/deploy/apps/dieuDonne/releases/20140626205924/config/application.rb:11:in `<top (required)>'
/home/deploy/apps/dieuDonne/releases/20140626205924/config/environment.rb:2:in `require'
/home/deploy/apps/dieuDonne/releases/20140626205924/config/environment.rb:2:in `<top (required)>'
config.ru:4:in `require'
config.ru:4:in `block in <main>'
/home/deploy/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:55:in `instance_eval'
/home/deploy/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:55:in `initialize'
config.ru:1:in `new'
config.ru:1:in `<main>'
/home/deploy/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/unicorn-4.8.3/lib/unicorn.rb:48:in `eval'
/home/deploy/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/unicorn-4.8.3/lib/unicorn.rb:48:in `block in builder'
/home/deploy/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:764:in `call'
/home/deploy/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:764:in `build_app!'
/home/deploy/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:628:in `init_worker_process'
/home/deploy/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:651:in `worker_loop'
/home/deploy/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:525:in `spawn_missing_workers'
/home/deploy/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:536:in `maintain_worker_count'
/home/deploy/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:294:in `join'
/home/deploy/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/unicorn-4.8.3/bin/unicorn:126:in `<top (required)>'
/home/deploy/.rbenv/versions/2.0.0-p353/bin/unicorn:23:in `load'
/home/deploy/.rbenv/versions/2.0.0-p353/bin/unicorn:23:in `<main>'
E, [2014-06-26T17:00:10.264215 #29381] ERROR -- : reaped #<Process::Status: pid 30561 exit 1> worker=1
I, [2014-06-26T17:00:10.264613 #29381] INFO -- : worker=1 spawning...
I, [2014-06-26T17:00:10.269636 #30567] INFO -- : worker=1 spawned pid=30567
I, [2014-06-26T17:00:10.272775 #30567] INFO -- : Refreshing Gem list
E, [2014-06-26T17:00:10.996570 #30564] ERROR -- : uninitialized constant Rack::Attack (NameError)
Here is the gem list from my deploy process.
DEBUG[28cd8523] Using rake 10.3.2
DEBUG[28cd8523] Using i18n 0.6.9
DEBUG[28cd8523] Using minitest 4.7.5
DEBUG[28cd8523] Using multi_json 1.10.1
DEBUG[28cd8523] Using thread_safe 0.3.4
DEBUG[28cd8523] Using tzinfo 0.3.39
DEBUG[28cd8523] Using activesupport 4.0.2
DEBUG[28cd8523] Using builder 3.1.4
DEBUG[28cd8523] Using erubis 2.7.0
DEBUG[28cd8523] Using rack 1.5.2
DEBUG[28cd8523] Using rack-test 0.6.2
DEBUG[28cd8523] Using actionpack 4.0.2
DEBUG[28cd8523] Using mime-types 1.25.1
DEBUG[28cd8523] Using polyglot 0.3.5
DEBUG[28cd8523] Using treetop 1.4.15
DEBUG[28cd8523] Using mail 2.5.4
DEBUG[28cd8523] Using actionmailer 4.0.2
DEBUG[28cd8523] Using arbre 1.0.1
DEBUG[28cd8523] Using sass 3.2.19
DEBUG[28cd8523] Using thor 0.19.1
DEBUG[28cd8523] Using bourbon 3.2.3
DEBUG[28cd8523] Using coffee-script-source 1.7.0
DEBUG[28cd8523] Using execjs 2.1.0
DEBUG[28cd8523] Using coffee-script 2.2.0
DEBUG[28cd8523] Using railties 4.0.2
DEBUG[28cd8523] Using coffee-rails 4.0.1
DEBUG[28cd8523] Using formtastic 2.3.0.rc3
DEBUG[28cd8523] Using has_scope 0.6.0.rc
DEBUG[28cd8523] Using responders 1.0.0
DEBUG[28cd8523] Using inherited_resources 1.4.1
DEBUG[28cd8523] Using jquery-rails 3.1.0
DEBUG[28cd8523] Using jquery-ui-rails 4.2.1
DEBUG[28cd8523] Using kaminari 0.15.1
DEBUG[28cd8523] Using activemodel 4.0.2
DEBUG[28cd8523] Using activerecord-deprecated_finders 1.0.3
DEBUG[28cd8523] Using arel 4.0.2
DEBUG[28cd8523] Using activerecord 4.0.2
DEBUG[28cd8523] Using bundler 1.6.2
DEBUG[28cd8523] Using hike 1.2.3
DEBUG[28cd8523] Using tilt 1.4.1
DEBUG[28cd8523] Using sprockets 2.11.0
DEBUG[28cd8523] Using sprockets-rails 2.0.1
DEBUG[28cd8523] Using rails 4.0.2
DEBUG[28cd8523] Using polyamorous 1.0.0
DEBUG[28cd8523] Using ransack 1.2.3
DEBUG[28cd8523] Using sass-rails 4.0.3
DEBUG[28cd8523] Using activeadmin 1.0.0.pre from git://github.com/gregbell/active_admin.git (at master)
DEBUG[28cd8523] Using bcrypt 3.1.7
DEBUG[28cd8523] Using cancan 1.6.10
DEBUG[28cd8523] Using colorize 0.7.3
DEBUG[28cd8523] Using net-ssh 2.9.1
DEBUG[28cd8523] Using net-scp 1.2.1
DEBUG[28cd8523] Using sshkit 1.5.1
DEBUG[28cd8523] Using capistrano 3.2.1
DEBUG[28cd8523] Using capistrano-bundler 1.1.2
DEBUG[28cd8523] Using capistrano-rails 1.1.1
DEBUG[28cd8523] Using capistrano-rbenv 2.0.2
DEBUG[28cd8523] Using json 1.8.1
DEBUG[28cd8523] Using carrierwave 0.10.0
DEBUG[28cd8523] Using daemons 1.1.9
DEBUG[28cd8523] Using delayed_job 4.0.1
DEBUG[28cd8523] Using delayed_job_active_record 4.0.1
DEBUG[28cd8523] Using orm_adapter 0.5.0
DEBUG[28cd8523] Using warden 1.2.3
DEBUG[28cd8523] Using devise 3.2.4
DEBUG[28cd8523] Using diff-lcs 1.2.5
DEBUG[28cd8523] Using excon 0.34.0
DEBUG[28cd8523] Using formatador 0.2.5
DEBUG[28cd8523] Using fog-core 1.22.0
DEBUG[28cd8523] Using fog-json 1.0.0
DEBUG[28cd8523] Using fog-brightbox 0.0.2
DEBUG[28cd8523] Using ipaddress 0.8.0
DEBUG[28cd8523] Using mini_portile 0.6.0
DEBUG[28cd8523] Using nokogiri 1.6.2.1
DEBUG[28cd8523] Using fog 1.22.1
DEBUG[28cd8523] Using jbuilder 1.5.3
DEBUG[28cd8523] Using jquery-fileupload-rails 0.4.1
DEBUG[28cd8523] Using kgio 2.9.2
DEBUG[28cd8523] Using liquid 2.6.1
DEBUG[28cd8523] Using subexec 0.2.3
DEBUG[28cd8523] Using mini_magick 3.7.0
DEBUG[28cd8523] Using pg 0.17.1
DEBUG[28cd8523] Using rack-attack 4.1.0
DEBUG[28cd8523] Using raindrops 0.13.0
DEBUG[28cd8523] Using rdoc 4.1.1
DEBUG[28cd8523] Using rmagick 2.13.2
DEBUG[28cd8523] Using rolify 3.4.0
DEBUG[28cd8523] Using rspec-core 2.14.8
DEBUG[28cd8523] Using rspec-expectations 2.14.5
DEBUG[28cd8523] Using rspec-mocks 2.14.6
DEBUG[28cd8523] Using rspec 2.14.1
DEBUG[28cd8523] Using sdoc 0.4.0
DEBUG[28cd8523] Using uglifier 2.5.0
DEBUG[28cd8523] Using unicorn 4.8.3
DEBUG[28cd8523] Using wicked 1.0.3
DEBUG[28cd8523] Your bundle is complete!
DEBUG[28cd8523] Gems in the groups development and test were not installed.
DEBUG[28cd8523] It was installed into /home/deploy/apps/<appname>/shared/vendor/bundle
My application.rb looks like this:
require File.expand_path('../boot', __FILE__)
require 'rails/all'
require 'rubygems'
require 'rack'
# Require the gems listed in Gemfile, including any gems
# you've limited to :test, :development, or :production.
Bundler.require(:default, Rails.env)
module Wizard
class Application < Rails::Application
# Settings in config/environments/* take precedence over those specified here.
# Application configuration should go into files in config/initializers
# -- all .rb files in that directory are automatically loaded.
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
# config.time_zone = 'Central Time (US & Canada)'
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
# config.i18n.default_locale = :de
config.app_generators.scaffold_controller = :scaffold_controller
# we dont really care for localization.
config.i18n.enforce_available_locales = false
config.autoload_paths << Rails.root.join('lib', 'shared/vendor/bundle/*')
config.middleware.use Rack::Attack
end
end
hello I am here again with an error in my project.
I want to install activeadmin gem but it is showing me error as below.my rails version is 4.0.0
I looked to the solution provided but then also it shows me error.
Updating git://github.com/gregbell/active_admin.git
fatal: ambiguous argument 'rails4': unknown revision or path not in the working
tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
Git error: command `git rev-parse rails4` in directory
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/cache/bundler/git/active_admin-d
67faab65e9b74efbc8efb4a777a851e9f78b2ca has failed.
If this error persists you could try removing the cache directory
'C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/cache/bundler/git/active_admin-
d67faab65e9b74efbc8efb4a777a851e9f78b2ca'
If I remove the branch name it shows me error
Updating git://github.com/gregbell/active_admin.git
Resolving dependencies...
Bundler could not find compatible versions for gem "devise":
In Gemfile:
activeadmin (>= 0) x86-mingw32 depends on
devise (~> 3.2) x86-mingw32
devise (3.1.1)
Just you need to bundle first in starting of app.
No need to enter other gem files.
gem 'activeadmin', github: 'gregbell/active_admin'
in the Gemfile and bundle .It will automatically download all necessary gem in your application.
C:\Sites\try>bundle
Updating git://github.com/gregbell/active_admin.git
Fetching gem metadata from https://rubygems.org/...........
Fetching gem metadata from https://rubygems.org/..
Resolving dependencies...
Using rake (10.1.1)
Using i18n (0.6.9)
Using minitest (4.7.5)
Using multi_json (1.8.4)
Using atomic (1.1.14)
Using thread_safe (0.1.3)
Using tzinfo (0.3.38)
Using activesupport (4.0.0)
Using builder (3.1.4)
Using erubis (2.7.0)
Using rack (1.5.2)
Using rack-test (0.6.2)
Using actionpack (4.0.0)
Using mime-types (1.25.1)
Using polyglot (0.3.3)
Using treetop (1.4.15)
Using mail (2.5.4)
Using actionmailer (4.0.0)
Installing arbre (1.0.1)
Using sass (3.2.14)
Using thor (0.18.1)
Installing bourbon (3.1.8)
Using coffee-script-source (1.6.3)
Using execjs (2.0.2)
Using coffee-script (2.2.0)
Using railties (4.0.0)
Using coffee-rails (4.0.1)
Using bcrypt-ruby (3.1.2)
Installing orm_adapter (0.5.0)
Using warden (1.2.3)
Installing devise (3.2.2)
Installing formtastic (2.3.0.rc2)
Installing has_scope (0.6.0.rc)
Installing responders (1.0.0)
Installing inherited_resources (1.4.1)
Using jquery-rails (3.0.4)
Using jquery-ui-rails (4.1.1)
Installing kaminari (0.15.1)
Using activemodel (4.0.0)
Using activerecord-deprecated_finders (1.0.3)
Using arel (4.0.1)
Using activerecord (4.0.0)
Using bundler (1.3.5)
Using hike (1.2.3)
Using tilt (1.4.1)
Using sprockets (2.10.1)
Using sprockets-rails (2.0.1)
Using rails (4.0.0)
Installing polyamorous (0.6.4)
Installing ransack (1.1.0)
Using sass-rails (4.0.1)
Using activeadmin (1.0.0.pre) from git://github.com/gregbell/active_admin.git (at master)
Using jbuilder (1.5.3)
Using json (1.8.1)
Using pg (0.17.0)
Using rdoc (4.1.1)
Using sdoc (0.4.0)
Using turbolinks (2.2.0)
Using uglifier (2.4.0)
Your bundle is complete!
Use `bundle show [gemname]` to see where a bundled gem is installed.
I suspect that your Gemfile restricts your devise version to something like ~> 3.1.0, which means it won't let you upgrade to 3.2. You are correct in removing the rails4 branch, as master is now the official Rails4-compatible branch. If you remove your devise version restriction, you should probably be able to get it working.
Just for information:
If someone faces similar issue, and already have gem 'devise', without version in the Gemfile, then first do a bundle install and then try to update Gemfile with active_admin
I'm trying to install the latest ruby and latest rails in latest gem version
I have rvm installed and created a new gemset named hotel
~$ rvm use ruby-2.0.0-p247#hotel
Using /home/circar/.rvm/gems/ruby-2.0.0-p247 with gemset hotel
~$ gem list
*** LOCAL GEMS ***
actionmailer (4.0.0)
actionpack (4.0.0)
activemodel (4.0.0)
activerecord (4.0.0)
activerecord-deprecated_finders (1.0.3)
activesupport (4.0.0)
arel (4.0.0)
atomic (1.1.14)
builder (3.1.4)
bundler (1.3.5)
coffee-rails (4.0.0)
coffee-script (2.2.0)
coffee-script-source (1.6.3)
erubis (2.7.0)
execjs (2.0.1)
hike (1.2.3)
i18n (0.6.5)
jbuilder (1.5.1)
mail (2.5.4)
mime-types (1.25)
minitest (4.7.5)
multi_json (1.8.0)
polyglot (0.3.3)
rack (1.5.2)
rack-test (0.6.2)
rails (4.0.0)
railties (4.0.0)
rake (10.1.0)
rubygems-update (2.1.1)
rvm (1.11.3.8)
sprockets (2.10.0)
sprockets-rails (2.0.0)
thor (0.18.1)
thread_safe (0.1.3)
tilt (1.4.1)
treetop (1.4.15)
tzinfo (0.3.37)
~$ ruby -v
ruby 2.0.0p247 (2013-06-27 revision 41674) [i686-linux]
~$ rails -v
Rails 4.0.0
~$ gem -v
2.1.1
But when I'm trying to install
jquery-rails
as
~$ sudo gem install jquery-rails
It shows Error as
ERROR: Error installing jquery-rails:
activesupport requires Ruby version >= 1.9.3.
Anyone please help me to install the jquery-rails gem with the latest update environment.
The gem is also pointing the current rvm
$ which gem
/home/circar/.rvm/rubies/ruby-2.0.0-p247/bin/gem
I googled it, but i dont know why i stumble in this place? I am unable to find any problem in my process, as stated everywhere.
Any help highly appreciated.
Thanks in advance.
sudo gem install jquery-rails is probably using your system's built-in Ruby (which is likely 1.8, or 1.9.2). This is because you're using sudo.
With RVM, get rid of the sudo and it'll use RVM instead:
gem install jquery-rails