I'm trying to install the Redmine Agile plugin, and I can't get through step 4:
/var/www/html/redmine$ sudo bundle exec rake redmine:plugins NAME=redmine_agile RAILS_ENV=production
(in /usr/share/redmine)
rake aborted!
Gem::LoadError: Specified 'mysql2' for database adapter, but the gem is not loaded. Add `gem 'mysql2'` to your Gemfile (and ensure its version is at the minimum required by ActiveRecord).
/usr/share/redmine/lib/plugins/acts_as_activity_provider/init.rb:2:in `block in <top (required)>'
/usr/share/redmine/config/initializers/00-core_plugins.rb:12:in `eval'
/usr/share/redmine/config/initializers/00-core_plugins.rb:12:in `block in <top (required)>'
/usr/share/redmine/config/initializers/00-core_plugins.rb:2:in `each'
/usr/share/redmine/config/initializers/00-core_plugins.rb:2:in `<top (required)>'
/usr/share/redmine/config/environment.rb:14:in `<top (required)>'
/usr/share/redmine/lib/tasks/redmine.rake:52:in `block (2 levels) in <top (required)>'
/var/lib/gems/2.3.0/gems/rake-12.3.2/exe/rake:27:in `<top (required)>'
Caused by:
Gem::LoadError: mysql2 is not part of the bundle. Add it to your Gemfile.
/var/lib/gems/2.3.0/gems/bundler-1.16.2/lib/bundler/rubygems_integration.rb:408:in `block (2 levels) in replace_gem'
/usr/share/redmine/lib/plugins/acts_as_activity_provider/init.rb:2:in `block in <top (required)>'
/usr/share/redmine/config/initializers/00-core_plugins.rb:12:in `eval'
/usr/share/redmine/config/initializers/00-core_plugins.rb:12:in `block in <top (required)>'
/usr/share/redmine/config/initializers/00-core_plugins.rb:2:in `each'
/usr/share/redmine/config/initializers/00-core_plugins.rb:2:in `<top (required)>'
/usr/share/redmine/config/environment.rb:14:in `<top (required)>'
/usr/share/redmine/lib/tasks/redmine.rake:52:in `block (2 levels) in <top (required)>'
/var/lib/gems/2.3.0/gems/rake-12.3.2/exe/rake:27:in `<top (required)>'
Tasks: TOP => redmine:plugins:migrate => environment
(See full trace by running task with --trace)
I previously had been unable to sudo gem install mysql2, but got around that by following this answer.
I did try adding gem "mysql2", but that did not resolve the issue.
/var/www/html/redmine$ cat plugins/redmine_agile/Gemfile
gem "redmine_crm"
gem "mysql2"
I'm not sure what to make of and ensure its version is at the minimum required by ActiveRecord. I'm not sure how to check what that is. I know I can set versions of a gem in the Gemfile, but I don't know what it would be set to.
I'm on Ubuntu 16.04.4 LTS, MySQL 5.7.22. I'm serving Redmine using something similar to this answer.
UPDATE
When I tried to rake as www-data, the error I got changed to
www-data#host:/usr/share/redmine/public/plugins/redmine_agile$ bundle exec rake redmine:plugins NAME=redmine_agile RAILS_ENV=production
`/home/ubuntu` is not writable.
Bundler will use `/tmp/bundler/home/ubuntu' as your home directory temporarily.
Could not find gem 'redmine_crm' in any of the gem sources listed in your Gemfile.
Run `bundle install` to install missing gems.
(Trying to rake from /var/www/html/redmine kept getting me the mysql2 error.)
I then tried to install redmine_crm. I couldn't do this as www-data, so I did it as root:
/var/www/html/redmine/plugins/redmine_agile$ sudo gem install redmine_crm
I then tried bundle install but got
There was an error while trying to write to
`/usr/share/redmine/public/plugins/redmine_agile/Gemfile.lock`. It is likely that you need to grant
write permissions for that path.
So I ran that as root.
/var/www/html/redmine/plugins/redmine_agile$ sudo bundle install
Don't run Bundler as root. Bundler can ask for sudo if it is needed, and installing your bundle as
root will break this application for all non-root users on this machine.
Resolving dependencies...
Using rake 12.3.2
Using i18n 0.7.0
Using json 1.8.3
Using minitest 5.11.3
Using thread_safe 0.3.6
Using tzinfo 1.2.5
Using activesupport 4.2.6
Using builder 3.2.3
Using erubis 2.7.0
Using nokogiri 1.6.7.2
Using rails-deprecated_sanitizer 1.0.3
Using rails-dom-testing 1.0.6
Using crass 1.0.4
Using loofah 2.2.2
Using rails-html-sanitizer 1.0.4
Using actionview 4.2.6
Using rack 1.6.4
Using rack-test 0.6.3
Using actionpack 4.2.6
Using globalid 0.4.1
Using activejob 4.2.6
Using mini_mime 1.0.0
Using mail 2.7.0
Using actionmailer 4.2.6
Using activemodel 4.2.6
Using arel 6.0.3
Using activerecord 4.2.6
Using bundler 1.16.2
Using concurrent-ruby 1.0.5
Using liquid 2.6.3
Using mysql2 0.5.2
Using thor 0.20.0
Using railties 4.2.6
Using sprockets 3.7.2
Using sprockets-rails 3.2.1
Using rails 4.2.6
Using redmine_crm 0.0.42
Bundle complete! 2 Gemfile dependencies, 37 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.
Trying rake then got me a different error.
ubuntu#host:/var/www/html/redmine/plugins/redmine_agile$ sudo bundle exec rake redmine:plugins NAME=redmine_agile RAILS_ENV=production
(in /usr/share/redmine)
rake aborted!
NameError: uninitialized constant ActionDispatch::XmlParamsParser
/usr/share/redmine/config/application.rb:55:in `<class:Application>'
/usr/share/redmine/config/application.rb:8:in `<module:RedmineApp>'
/usr/share/redmine/config/application.rb:7:in `<top (required)>'
/usr/share/redmine/Rakefile:4:in `require'
/usr/share/redmine/Rakefile:4:in `<top (required)>'
/var/lib/gems/2.3.0/gems/rake-12.3.2/exe/rake:27:in `<top (required)>'
(See full trace by running task with --trace)
Trying that from the redmine per this answer directory failed with the mysql2 gem error.
ubuntu#host:/var/www/html/redmine/plugins/redmine_agile$ cd ../..
ubuntu#host:/var/www/html/redmine$ sudo bundle exec rake redmine:plugins NAME=redmine_agile RAILS_ENV=production
(in /usr/share/redmine)
rake aborted!
Gem::LoadError: Specified 'mysql2' for database adapter, but the gem is not loaded. Add `gem 'mysql2'` to your Gemfile (and ensure its version is at the minimum required by ActiveRecord).
/usr/share/redmine/lib/plugins/acts_as_activity_provider/init.rb:2:in `block in <top (required)>'
/usr/share/redmine/config/initializers/00-core_plugins.rb:12:in `eval'
/usr/share/redmine/config/initializers/00-core_plugins.rb:12:in `block in <top (required)>'
/usr/share/redmine/config/initializers/00-core_plugins.rb:2:in `each'
/usr/share/redmine/config/initializers/00-core_plugins.rb:2:in `<top (required)>'
/usr/share/redmine/config/environment.rb:14:in `<top (required)>'
/usr/share/redmine/lib/tasks/redmine.rake:52:in `block (2 levels) in <top (required)>'
/var/lib/gems/2.3.0/gems/rake-12.3.2/exe/rake:27:in `<top (required)>'
Caused by:
Gem::LoadError: mysql2 is not part of the bundle. Add it to your Gemfile.
/var/lib/gems/2.3.0/gems/bundler-1.16.2/lib/bundler/rubygems_integration.rb:408:in `block (2 levels) in replace_gem'
/usr/share/redmine/lib/plugins/acts_as_activity_provider/init.rb:2:in `block in <top (required)>'
/usr/share/redmine/config/initializers/00-core_plugins.rb:12:in `eval'
/usr/share/redmine/config/initializers/00-core_plugins.rb:12:in `block in <top (required)>'
/usr/share/redmine/config/initializers/00-core_plugins.rb:2:in `each'
/usr/share/redmine/config/initializers/00-core_plugins.rb:2:in `<top (required)>'
/usr/share/redmine/config/environment.rb:14:in `<top (required)>'
/usr/share/redmine/lib/tasks/redmine.rake:52:in `block (2 levels) in <top (required)>'
/var/lib/gems/2.3.0/gems/rake-12.3.2/exe/rake:27:in `<top (required)>'
Tasks: TOP => redmine:plugins:migrate => environment
(See full trace by running task with --trace)
Unnecessary use of sudo to run a command as root is a common cause of issues to find resolve some gems.
In almost all cases, you should thus not not use sudo to run your rake tasks. Instead, use the user which normally usually runs the app server, e.g. www-data.
# first change to the user that usually runs your app
sudo -u www-data /bin/bash -i
/var/www/html/redmine
# Now run your rake task (without prefixing it with sudo)
bundle exec rake redmine:plugins NAME=redmine_agile RAILS_ENV=production
This error is clearly saying that you have not installed Gem 'mysql2' have you ran command bundle install? can you try following
On your project root folder please run following command
gem list mysql2
It should show you local gems and also list mysql2 as installed
In case it is not installed, that means you either you can't install mysql2 or you have not run bundle install command. Maybe you can try the following
Add the following line in your Gemfile
gem "mysql2", "0.3.14"
now run following command
bundle install
Now check if mysql2 is really installed
gem list mysql2
If yes then all good, hope it works.
Related
following a guide a friend sent me, I tried rails s.
I am getting these errors when running rails s
First i'll show the version of ruby and rails
C:\>ruby -v
ruby 2.2.2p95 (2015-04-13 revision 50295) [x64-mingw32]
C:\>rails -v
Rails 4.2.1
C:\>
and I run rails new qwerty that goes fine
C:\rubyblah>rails new qwerty
create
create README.rdoc
create Rakefile
create config.ru
create .gitignore
create Gemfile
create app
create app/assets/javascripts/application.js
create app/assets/stylesheets/application.css
create app/controllers/application_controller.rb
create app/helpers/application_helper.rb
create app/views/layouts/application.html.erb
create app/assets/images/.keep
create app/mailers/.keep
create app/models/.keep
create app/controllers/concerns/.keep
create app/models/concerns/.keep
create bin
create bin/bundle
create bin/rails
create bin/rake
create bin/setup
create config
create config/routes.rb
create config/application.rb
create config/environment.rb
create config/secrets.yml
create config/environments
create config/environments/development.rb
create config/environments/production.rb
create config/environments/test.rb
create config/initializers
create config/initializers/assets.rb
create config/initializers/backtrace_silencers.rb
create config/initializers/cookies_serializer.rb
create config/initializers/filter_parameter_logging.rb
create config/initializers/inflections.rb
create config/initializers/mime_types.rb
create config/initializers/session_store.rb
create config/initializers/wrap_parameters.rb
create config/locales
create config/locales/en.yml
create config/boot.rb
create config/database.yml
create db
create db/seeds.rb
create lib
create lib/tasks
create lib/tasks/.keep
create lib/assets
create lib/assets/.keep
create log
create log/.keep
create public
create public/404.html
create public/422.html
create public/500.html
create public/favicon.ico
create public/robots.txt
create test/fixtures
create test/fixtures/.keep
create test/controllers
create test/controllers/.keep
create test/mailers
create test/mailers/.keep
create test/models
create test/models/.keep
create test/helpers
create test/helpers/.keep
create test/integration
create test/integration/.keep
create test/test_helper.rb
create tmp/cache
create tmp/cache/assets
create vendor/assets/javascripts
create vendor/assets/javascripts/.keep
create vendor/assets/stylesheets
create vendor/assets/stylesheets/.keep
run bundle install
Fetching gem metadata from https://rubygems.org/............
Fetching version metadata from https://rubygems.org/...
Fetching dependency metadata from https://rubygems.org/..
Resolving dependencies...
Using rake 10.4.2
Using i18n 0.7.0
Using json 1.8.2
Using minitest 5.6.1
Using thread_safe 0.3.5
Using tzinfo 1.2.2
Using activesupport 4.2.1
Using builder 3.2.2
Using erubis 2.7.0
Using mini_portile 0.6.2
Using nokogiri 1.6.6.2
Using rails-deprecated_sanitizer 1.0.3
Using rails-dom-testing 1.0.6
Using loofah 2.0.2
Using rails-html-sanitizer 1.0.2
Using actionview 4.2.1
Using rack 1.6.1
Using rack-test 0.6.3
Using actionpack 4.2.1
Using globalid 0.3.5
Using activejob 4.2.1
Using mime-types 2.6.1
Using mail 2.6.3
Using actionmailer 4.2.1
Using activemodel 4.2.1
Using arel 6.0.0
Using activerecord 4.2.1
Using debug_inspector 0.0.2
Using binding_of_caller 0.7.2
Using bundler 1.9.9
Using columnize 0.9.0
Using byebug 5.0.0
Using coffee-script-source 1.9.1.1
Using execjs 2.5.2
Using coffee-script 2.4.1
Using thor 0.19.1
Using railties 4.2.1
Using coffee-rails 4.1.0
Using multi_json 1.11.0
Using jbuilder 2.2.16
Using jquery-rails 4.0.3
Using sprockets 3.1.0
Using sprockets-rails 2.3.1
Using rails 4.2.1
Using rdoc 4.2.0
Using sass 3.4.14
Using tilt 1.4.1
Using sass-rails 5.0.3
Using sdoc 0.4.1
Using sqlite3 1.3.10
Using turbolinks 2.5.3
Using tzinfo-data 1.2015.4
Using uglifier 2.7.1
Using web-console 2.1.2
Bundle complete! 12 Gemfile dependencies, 54 gems now installed.
Use `bundle show [gemname]` to see where a bundled gem is installed.
--
then bundle install goes fine
C:\rubyblah>cd qwerty
C:\rubyblah\qwerty>bundle install
Using rake 10.4.2
Using i18n 0.7.0
Using json 1.8.2
Using minitest 5.6.1
Using thread_safe 0.3.5
Using tzinfo 1.2.2
Using activesupport 4.2.1
Using builder 3.2.2
Using erubis 2.7.0
Using mini_portile 0.6.2
Using nokogiri 1.6.6.2
Using rails-deprecated_sanitizer 1.0.3
Using rails-dom-testing 1.0.6
Using loofah 2.0.2
Using rails-html-sanitizer 1.0.2
Using actionview 4.2.1
Using rack 1.6.1
Using rack-test 0.6.3
Using actionpack 4.2.1
Using globalid 0.3.5
Using activejob 4.2.1
Using mime-types 2.6.1
Using mail 2.6.3
Using actionmailer 4.2.1
Using activemodel 4.2.1
Using arel 6.0.0
Using activerecord 4.2.1
Using debug_inspector 0.0.2
Using binding_of_caller 0.7.2
Using columnize 0.9.0
Using byebug 5.0.0
Using coffee-script-source 1.9.1.1
Using execjs 2.5.2
Using coffee-script 2.4.1
Using thor 0.19.1
Using railties 4.2.1
Using coffee-rails 4.1.0
Using multi_json 1.11.0
Using jbuilder 2.2.16
Using jquery-rails 4.0.3
Using bundler 1.9.9
Using sprockets 3.1.0
Using sprockets-rails 2.3.1
Using rails 4.2.1
Using rdoc 4.2.0
Using sass 3.4.14
Using tilt 1.4.1
Using sass-rails 5.0.3
Using sdoc 0.4.1
Using sqlite3 1.3.10
Using turbolinks 2.5.3
Using tzinfo-data 1.2015.4
Using uglifier 2.7.1
Using web-console 2.1.2
Bundle complete! 12 Gemfile dependencies, 54 gems now installed.
Use `bundle show [gemname]` to see where a bundled gem is installed.
--
then rails s, and I get these errors
C:\rubyblah\qwerty>rails s
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sqlite3-1.3.10-x64-mingw32/lib/sqlite3.rb
:6:in `require': cannot load such file -- sqlite3/sqlite3_native (LoadError)
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sqlite3-1.3.10-x64-mingw32/l
ib/sqlite3.rb:6:in `rescue in <top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sqlite3-1.3.10-x64-mingw32/l
ib/sqlite3.rb:2:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/ru
ntime.rb:76:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/ru
ntime.rb:76:in `block (2 levels) in require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/ru
ntime.rb:72:in `each'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/ru
ntime.rb:72:in `block in require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/ru
ntime.rb:61:in `each'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/ru
ntime.rb:61:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler.rb
:134:in `require'
from C:/rubyblah/qwerty/config/application.rb:7:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/com
mands/commands_tasks.rb:78:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/com
mands/commands_tasks.rb:78:in `block in server'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/com
mands/commands_tasks.rb:75:in `tap'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/com
mands/commands_tasks.rb:75:in `server'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/com
mands/commands_tasks.rb:39:in `run_command!'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/com
mands.rb:17:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
C:\rubyblah\qwerty>
I found this regarding the first error
cannot load such file -- sqlite3/sqlite3_native (LoadError) on ruby on rails
So I edited the corresponding gemspec file as instructed
C:\>dir sql*.gemspec /s/b
C:\Ruby22-x64\lib\ruby\gems\2.2.0\specifications\sqlite3-1.3.10-x64-mingw32.gems
pec
I edit that gemspec file changing s.require_paths = ["lib"] to s.require_paths = ["lib/sqlite3_native"]
Then when I run rails s, I get a whole new bunch of errors
C:\rubyblah\qwerty>rails s
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/nokogiri-1.6.6.2-x64-mingw32/lib/nokogiri
.rb:29:in `require': cannot load such file -- nokogiri/nokogiri (LoadError)
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/nokogiri-1.6.6.2-x64-mingw32
/lib/nokogiri.rb:29:in `rescue in <top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/nokogiri-1.6.6.2-x64-mingw32
/lib/nokogiri.rb:25:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/loofah-2.0.2/lib/loofah.rb:3
:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/loofah-2.0.2/lib/loofah.rb:3
:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rails-html-sanitizer-1.0.2/l
ib/rails-html-sanitizer.rb:2:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rails-html-sanitizer-1.0.2/l
ib/rails-html-sanitizer.rb:2:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/actionview-4.2.1/lib/action_
view/helpers/sanitize_helper.rb:3:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/actionview-4.2.1/lib/action_
view/helpers/sanitize_helper.rb:3:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/actionview-4.2.1/lib/action_
view/helpers/text_helper.rb:32:in `<module:TextHelper>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/actionview-4.2.1/lib/action_
view/helpers/text_helper.rb:29:in `<module:Helpers>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/actionview-4.2.1/lib/action_
view/helpers/text_helper.rb:6:in `<module:ActionView>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/actionview-4.2.1/lib/action_
view/helpers/text_helper.rb:4:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/actionview-4.2.1/lib/action_
view/helpers/form_tag_helper.rb:18:in `<module:FormTagHelper>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/actionview-4.2.1/lib/action_
view/helpers/form_tag_helper.rb:14:in `<module:Helpers>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/actionview-4.2.1/lib/action_
view/helpers/form_tag_helper.rb:8:in `<module:ActionView>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/actionview-4.2.1/lib/action_
view/helpers/form_tag_helper.rb:6:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/actionview-4.2.1/lib/action_
view/helpers/form_helper.rb:4:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/actionview-4.2.1/lib/action_
view/helpers/form_helper.rb:4:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/actionview-4.2.1/lib/action_
view/helpers.rb:50:in `<module:Helpers>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/actionview-4.2.1/lib/action_
view/helpers.rb:4:in `<module:ActionView>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/actionview-4.2.1/lib/action_
view/helpers.rb:3:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sprockets-rails-2.3.1/lib/sp
rockets/rails/legacy_asset_tag_helper.rb:7:in `<module:LegacyAssetTagHelper>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sprockets-rails-2.3.1/lib/sp
rockets/rails/legacy_asset_tag_helper.rb:6:in `<module:Rails>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sprockets-rails-2.3.1/lib/sp
rockets/rails/legacy_asset_tag_helper.rb:4:in `<module:Sprockets>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sprockets-rails-2.3.1/lib/sp
rockets/rails/legacy_asset_tag_helper.rb:3:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sprockets-rails-2.3.1/lib/sp
rockets/rails/helper.rb:54:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sprockets-rails-2.3.1/lib/sp
rockets/rails/helper.rb:54:in `<module:Helper>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sprockets-rails-2.3.1/lib/sp
rockets/rails/helper.rb:7:in `<module:Rails>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sprockets-rails-2.3.1/lib/sp
rockets/rails/helper.rb:6:in `<module:Sprockets>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sprockets-rails-2.3.1/lib/sp
rockets/rails/helper.rb:5:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sprockets-rails-2.3.1/lib/sp
rockets/railtie.rb:6:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sprockets-rails-2.3.1/lib/sp
rockets/railtie.rb:6:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sass-rails-5.0.3/lib/sass/ra
ils/railtie.rb:3:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sass-rails-5.0.3/lib/sass/ra
ils/railtie.rb:3:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sass-rails-5.0.3/lib/sass/ra
ils.rb:11:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sass-rails-5.0.3/lib/sass/ra
ils.rb:11:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sass-rails-5.0.3/lib/sass-ra
ils.rb:1:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sass-rails-5.0.3/lib/sass-ra
ils.rb:1:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/ru
ntime.rb:76:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/ru
ntime.rb:76:in `block (2 levels) in require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/ru
ntime.rb:72:in `each'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/ru
ntime.rb:72:in `block in require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/ru
ntime.rb:61:in `each'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/ru
ntime.rb:61:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler.rb
:134:in `require'
from C:/rubyblah/qwerty/config/application.rb:7:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/com
mands/commands_tasks.rb:78:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/com
mands/commands_tasks.rb:78:in `block in server'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/com
mands/commands_tasks.rb:75:in `tap'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/com
mands/commands_tasks.rb:75:in `server'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/com
mands/commands_tasks.rb:39:in `run_command!'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/com
mands.rb:17:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
C:\rubyblah\qwerty>
One option is downgrading ruby to a version that is stable/working with windows. The other option is installing a linux VM and installing Ruby there.
You need to install a version of Ruby that is stable with Windows.
Not the latest version of Ruby. As of writing the latest is 2.2.2 and not stable with Windows.
And even if you are on a 64bit machine, the stable Ruby for Windows is a 32bit.
You want Ruby 2.1.X e.g. Ruby 2.1.6 (the latest 2.1.x is fine, 2.1.6) And you want the 32bit version
http://dl.bintray.com/oneclick/rubyinstaller/rubyinstaller-2.1.6.exe
That is mentioned here http://rubyinstaller.org/downloads/ "we recommend you use Ruby 2.1.X installers. These provide a stable language and a extensive list of packages (gems) that are compatible and updated.
However, not all packages (gems) are maintained. Some older packages may not be compatible with newer versions of Ruby and RubyInstaller.
The 64-bit versions of Ruby are relatively new on the Windows area and not all the packages have been updated to be compatible with it. To use this version you will require some knowledge about compilers and solving dependency issues, which might be too complicated if you just want to play with the language."
Take note of that instruction
So remove any current Ruby you have.
To remove Ruby, you go to the start menu..Ruby.. and click Uninstall.
That should uninstall Rails too.
And remove any devkit. The devkit executable installs by extraction to a folder you specify so just rmdir/remove that folder.
Now install that stable ruby.. 2.1.6 32bit
Install rails and the devkit
The command to install rails
gem install rails
An to install the devkit make sure you have the correct one
e.g.
http://rubyinstaller.org/downloads/
WHICH DEVELOPMENT KIT?
....
Ruby 1.8.6 to 1.9.3: tdm-32-4.5.2
Ruby 2.0.0 and above (32bits): mingw64-32-4.7.2
Ruby 2.0.0 and above x64 (64bits): mingw64-64-4.7.2
So you want
Ruby 2.0.0 and above (32bits): mingw64-32-4.7.2
Look at the available devkits
DEVELOPMENT KIT
For use with Ruby 1.8.7 and 1.9.3:
DevKit-tdm-32-4.5.2-20111229-1559-sfx.exe
For use with Ruby 2.0 and above (32bits version only):
DevKit-mingw64-32-4.7.2-20130224-1151-sfx.exe
For use with Ruby 2.0 and above (x64 - 64bits only)
DevKit-mingw64-64-4.7.2-20130224-1432-sfx.exe
You want
DevKit-tdm-32-4.5.2-20111229-1559-sfx.exe
For use with Ruby 2.0 and above (32bits version only):
http://dl.bintray.com/oneclick/rubyinstaller/DevKit-mingw64-32-4.7.2-20130224-1151-sfx.exe
Follow the instructions from here to install devkit https://github.com/oneclick/rubyinstaller/wiki/Development-Kit
So say you put it in c:\devkit
c:\devkit>ruby dk.rb init
c:\devkit>ruby dk.rb install
you can run this command though i don't think it's necessary
c:\sdfsd>gem install json --platform=ruby
so now you have ruby and rails and the devkit installed
rails new <project name>
cd <project name>
bundle install
rails s
http://localhost:3000 (in your browser)
and it says 'welcome aboard'
It looks like the sqlite3 gem doesn't have a have a fat binary for Ruby 2.2 yet.
You can wait till one is published but gem authors usually only do fat binary builds on a gem release.
My recommendation is to downgrade to Ruby 2.1.6, at least until newer versions of those gems are released.
I think I screwed up and now I'm stuck with this error message :(
How do I get out of here?
pedal#RN-145-97-138-125:~$ rails -v
/Users/pedal/.rvm/rubies/ruby-2.2.1/lib/ruby/site_ruby/2.2.0/rubygems/dependency.rb:315:in
`to_specs': Could not find 'actionpack' (= 4.2.1) among 62 total
gem(s) (Gem::LoadError) Checked in
'GEM_PATH=/Users/pedal/.rvm/gems/ruby-2.2.1:/Users/pedal/.rvm/gems/ruby-2.2.1#global',
execute `gem env` for more information from
/Users/pedal/.rvm/rubies/ruby-2.2.1/lib/ruby/site_ruby/2.2.0/rubygems/specification.rb:1311:in
`block in activate_dependencies' from
/Users/pedal/.rvm/rubies/ruby-2.2.1/lib/ruby/site_ruby/2.2.0/rubygems/specification.rb:1300:in
`each' from
/Users/pedal/.rvm/rubies/ruby-2.2.1/lib/ruby/site_ruby/2.2.0/rubygems/specification.rb:1300:in
`activate_dependencies' from
/Users/pedal/.rvm/rubies/ruby-2.2.1/lib/ruby/site_ruby/2.2.0/rubygems/specification.rb:1282:in
`activate' from
/Users/pedal/.rvm/rubies/ruby-2.2.1/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_gem.rb:67:in
`block in gem' from
/Users/pedal/.rvm/rubies/ruby-2.2.1/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_gem.rb:66:in
`synchronize' from
/Users/pedal/.rvm/rubies/ruby-2.2.1/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_gem.rb:66:in
`gem' from /Users/pedal/.rvm/rubies/ruby-2.2.1/bin/rails:22:in
`<main>' from
/Users/pedal/.rvm/gems/ruby-2.2.1/bin/ruby_executable_hooks:15:in
`eval' from
/Users/pedal/.rvm/gems/ruby-2.2.1/bin/ruby_executable_hooks:15:in
`<main>'ยงยงยงยง
Try
gem pristine --all
Then
bundle install
In the terminal of project folder
It looks like you're missing the actionpack gem. Try (re-)installing it with gem install actionpack.
When mina deploy runs an error occurs during migration that pg gem is not loaded.The problem is that the gem is loaded in my gem file but during the mina's bundle install pg gem doesn't get installed.
Any ideas how to fix this issue?
-----> Migrating database
$ RAILS_ENV="production" bundle exec rake db:migrate
rake aborted!
Gem::LoadError: Specified 'postgresql' for database adapter, but the gem is not loaded. Add `gem 'pg'` to your Gemfile (and ensure its version is at the minimum required by ActiveRecord).
Gemfile
gem 'mail_form'
gem 'devise'
gem 'cancancan'
group :production do
gem 'pg'
gem 'therubyracer'
end
database.yml
production:
adapter: postgresql
encoding: unicode
database: tech
username: admin
password: PASSWORD
host: localhost
mina deploy --verbose
-----> Loading rbenv
$ export RBENV_ROOT="$HOME/.rbenv"
$ export PATH="$HOME/.rbenv/bin:$PATH"
$ eval "$(rbenv init -)"
-----> Creating a temporary build path
$ touch "deploy.lock"
$ mkdir -p "$build_path"
$ cd "$build_path"
-----> Fetching new git commits
$ (cd "/home/deployer/tech/scm" && git fetch "git#bitbucket.org:gns/tech.git" "master:m
$ (cd "/home/deployer/tech/scm" && git fetch "git#bitbucket.org:gns/tech.git" "master:master" --force)
-----> Using git branch 'master'
$ git clone "/home/deployer/tech/scm" . --recursive --branch "master"
Cloning into '.'...
done.
-----> Using this git commit
$ git --no-pager log --format='%aN (%h):%n> %s' -n 1
yiannis (4ef997e):
> Gemfile
$ rm -rf .git
-----> Symlinking shared paths
$ mkdir -p "./config"
$ mkdir -p "."
$ rm -rf "./config/database.yml"
$ ln -s "/home/deployer/tech/shared/config/database.yml" "./config/database.yml"
$ rm -rf "./log"
$ ln -s "/home/deployer/tech/shared/log" "./log"
$ rm -rf "./config/secrets.yml"
$ ln -s "/home/deployer/tech/shared/config/secrets.yml" "./config/secrets.yml"
-----> Installing gem dependencies using Bundler
$ mkdir -p "/home/deployer/tech/shared/bundle"
$ mkdir -p "./vendor"
$ ln -s "/home/deployer/tech/shared/bundle" "./vendor/bundle"
$ bundle install --without development:test --path "./vendor/bundle" --deployment
Fetching gem metadata from http://rubygems.org/........
Using rake 10.4.2
Using i18n 0.6.11
Using json 1.8.1
Using minitest 5.5.0
Using thread_safe 0.3.4
Using tzinfo 1.2.2
Using activesupport 4.1.8
Using builder 3.2.2
Using erubis 2.7.0
Using actionview 4.1.8
Using rack 1.5.2
Using rack-test 0.6.2
Using actionpack 4.1.8
Using mime-types 2.4.3
Using mail 2.6.3
Using actionmailer 4.1.8
Using activemodel 4.1.8
Using arel 5.0.1.20140414130214
Using activerecord 4.1.8
Using bundler 1.8.0.pre
Using thor 0.19.1
Using railties 4.1.8
Using hike 1.2.3
Using multi_json 1.10.1
Using tilt 1.4.1
Using sprockets 2.12.3
Using sprockets-rails 2.2.2
Using rails 4.1.8
Using animate-rails 1.0.7
Using aws-sdk-v1 1.59.1
Using aws-sdk 1.59.1
Using cancancan 1.9.2
Using chronic 0.10.2
Using climate_control 0.0.3
Using cocaine 0.5.5
Using coffee-script-source 1.8.0
Using execjs 2.2.2
Using coffee-script 2.3.0
Using coffee-rails 4.0.1
Using orm_adapter 0.5.0
Using responders 1.1.2
Using warden 1.2.3
Using devise 3.4.1
Using figaro 1.0.0
Using font-awesome-rails 4.2.0.0
Using foundation-datetimepicker-rails 0.1.3
Using sass 3.2.19
Using foundation-rails 5.4.5.0
Using friendly_id 5.0.4
Using google-webfonts-rails 0.0.4
Using jbuilder 2.2.6
Using jquery-rails 3.1.2
Using kaminari 0.16.1
Using libv8 3.16.14.7
Using mail_form 1.5.0
Using newrelic_rpm 3.9.8.273
Using paperclip 4.2.1
Using pg_search 0.7.8
Using rdoc 4.2.0
Using ref 1.0.5
Using sass-rails 4.0.5
Using sdoc 0.4.1
Using therubyracer 0.12.1
Using uglifier 2.6.0
Using whenever 0.9.4
Bundle complete! 25 Gemfile dependencies, 65 gems now installed.
Gems in the groups development and test were not installed.
Bundled gems are installed into ./vendor/bundle.
-----> Migrating database
$ RAILS_ENV="production" bundle exec rake db:migrate
rake aborted!
Gem::LoadError: Specified 'postgresql' for database adapter, but the gem is not loaded. Add `gem 'pg'` to your Gemfile (and ensure its version is at the minimum required by ActiveRecord).
/home/deployer/tech/tmp/build-142229948411279/vendor/bundle/ruby/2.1.0/gems/activerecord-4.1.8/lib/active_record/connection_adapters/connection_specification.rb:190:in `rescue in spec'
/home/deployer/tech/tmp/build-142229948411279/vendor/bundle/ruby/2.1.0/gems/activerecord-4.1.8/lib/active_record/connection_adapters/connection_specification.rb:187:in `spec'
/home/deployer/tech/tmp/build-142229948411279/vendor/bundle/ruby/2.1.0/gems/activerecord-4.1.8/lib/active_record/connection_handling.rb:50:in `establish_connection'
/home/deployer/tech/tmp/build-142229948411279/vendor/bundle/ruby/2.1.0/gems/activerecord-4.1.8/lib/active_record/railtie.rb:129:in `block (2 levels) in <class:Railtie>'
/home/deployer/tech/tmp/build-142229948411279/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.8/lib/active_support/lazy_load_hooks.rb:38:in `instance_eval'
/home/deployer/tech/tmp/build-142229948411279/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.8/lib/active_support/lazy_load_hooks.rb:38:in `execute_hook'
/home/deployer/tech/tmp/build-142229948411279/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.8/lib/active_support/lazy_load_hooks.rb:28:in `block in on_load'
/home/deployer/tech/tmp/build-142229948411279/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.8/lib/active_support/lazy_load_hooks.rb:27:in `each'
/home/deployer/tech/tmp/build-142229948411279/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.8/lib/active_support/lazy_load_hooks.rb:27:in `on_load'
/home/deployer/tech/tmp/build-142229948411279/vendor/bundle/ruby/2.1.0/gems/activerecord-4.1.8/lib/active_record/railtie.rb:118:in `block in <class:Railtie>'
/home/deployer/tech/tmp/build-142229948411279/vendor/bundle/ruby/2.1.0/gems/railties-4.1.8/lib/rails/initializable.rb:30:in `instance_exec'
/home/deployer/tech/tmp/build-142229948411279/vendor/bundle/ruby/2.1.0/gems/railties-4.1.8/lib/rails/initializable.rb:30:in `run'
/home/deployer/tech/tmp/build-142229948411279/vendor/bundle/ruby/2.1.0/gems/railties-4.1.8/lib/rails/initializable.rb:55:in `block in run_initializers'
/home/deployer/tech/tmp/build-142229948411279/vendor/bundle/ruby/2.1.0/gems/railties-4.1.8/lib/rails/initializable.rb:54:in `run_initializers'
/home/deployer/tech/tmp/build-142229948411279/vendor/bundle/ruby/2.1.0/gems/railties-4.1.8/lib/rails/application.rb:300:in `initialize!'
/home/deployer/tech/tmp/build-142229948411279/config/environment.rb:5:in `<top (required)>'
/home/deployer/tech/tmp/build-142229948411279/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.8/lib/active_support/dependencies.rb:247:in `require'
/home/deployer/tech/tmp/build-142229948411279/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.8/lib/active_support/dependencies.rb:247:in `block in require'
/home/deployer/tech/tmp/build-142229948411279/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.8/lib/active_support/dependencies.rb:232:in `load_dependency'
/home/deployer/tech/tmp/build-142229948411279/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.8/lib/active_support/dependencies.rb:247:in `require'
/home/deployer/tech/tmp/build-142229948411279/vendor/bundle/ruby/2.1.0/gems/railties-4.1.8/lib/rails/application.rb:276:in `require_environment!'
/home/deployer/tech/tmp/build-142229948411279/vendor/bundle/ruby/2.1.0/gems/railties-4.1.8/lib/rails/application.rb:389:in `block in run_tasks_blocks'
Gem::LoadError: pg is not part of the bundle. Add it to Gemfile.
/home/deployer/tech/tmp/build-142229948411279/vendor/bundle/ruby/2.1.0/gems/activerecord-4.1.8/lib/active_record/connection_adapters/postgresql_adapter.rb:13:in `<top (required)>'
/home/deployer/tech/tmp/build-142229948411279/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.8/lib/active_support/dependencies.rb:247:in `require'
/home/deployer/tech/tmp/build-142229948411279/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.8/lib/active_support/dependencies.rb:247:in `block in require'
/home/deployer/tech/tmp/build-142229948411279/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.8/lib/active_support/dependencies.rb:232:in `load_dependency'
/home/deployer/tech/tmp/build-142229948411279/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.8/lib/active_support/dependencies.rb:247:in `require'
/home/deployer/tech/tmp/build-142229948411279/vendor/bundle/ruby/2.1.0/gems/activerecord-4.1.8/lib/active_record/connection_adapters/connection_specification.rb:188:in `spec'
/home/deployer/tech/tmp/build-142229948411279/vendor/bundle/ruby/2.1.0/gems/activerecord-4.1.8/lib/active_record/connection_handling.rb:50:in `establish_connection'
/home/deployer/tech/tmp/build-142229948411279/vendor/bundle/ruby/2.1.0/gems/activerecord-4.1.8/lib/active_record/railtie.rb:129:in `block (2 levels) in <class:Railtie>'
/home/deployer/tech/tmp/build-142229948411279/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.8/lib/active_support/lazy_load_hooks.rb:38:in `instance_eval'
/home/deployer/tech/tmp/build-142229948411279/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.8/lib/active_support/lazy_load_hooks.rb:38:in `execute_hook'
/home/deployer/tech/tmp/build-142229948411279/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.8/lib/active_support/lazy_load_hooks.rb:28:in `block in on_load'
/home/deployer/tech/tmp/build-142229948411279/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.8/lib/active_support/lazy_load_hooks.rb:27:in `each'
/home/deployer/tech/tmp/build-142229948411279/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.8/lib/active_support/lazy_load_hooks.rb:27:in `on_load'
/home/deployer/tech/tmp/build-142229948411279/vendor/bundle/ruby/2.1.0/gems/activerecord-4.1.8/lib/active_record/railtie.rb:118:in `block in <class:Railtie>'
/home/deployer/tech/tmp/build-142229948411279/vendor/bundle/ruby/2.1.0/gems/railties-4.1.8/lib/rails/initializable.rb:30:in `instance_exec'
/home/deployer/tech/tmp/build-142229948411279/vendor/bundle/ruby/2.1.0/gems/railties-4.1.8/lib/rails/initializable.rb:30:in `run'
/home/deployer/tech/tmp/build-142229948411279/vendor/bundle/ruby/2.1.0/gems/railties-4.1.8/lib/rails/initializable.rb:55:in `block in run_initializers'
/home/deployer/tech/tmp/build-142229948411279/vendor/bundle/ruby/2.1.0/gems/railties-4.1.8/lib/rails/initializable.rb:54:in `run_initializers'
/home/deployer/tech/tmp/build-142229948411279/vendor/bundle/ruby/2.1.0/gems/railties-4.1.8/lib/rails/application.rb:300:in `initialize!'
/home/deployer/tech/tmp/build-142229948411279/config/environment.rb:5:in `<top (required)>'
/home/deployer/tech/tmp/build-142229948411279/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.8/lib/active_support/dependencies.rb:247:in `require'
/home/deployer/tech/tmp/build-142229948411279/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.8/lib/active_support/dependencies.rb:247:in `block in require'
/home/deployer/tech/tmp/build-142229948411279/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.8/lib/active_support/dependencies.rb:232:in `load_dependency'
/home/deployer/tech/tmp/build-142229948411279/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.8/lib/active_support/dependencies.rb:247:in `require'
/home/deployer/tech/tmp/build-142229948411279/vendor/bundle/ruby/2.1.0/gems/railties-4.1.8/lib/rails/application.rb:276:in `require_environment!'
/home/deployer/tech/tmp/build-142229948411279/vendor/bundle/ruby/2.1.0/gems/railties-4.1.8/lib/rails/application.rb:389:in `block in run_tasks_blocks'
Tasks: TOP => db:migrate => environment
(See full trace by running task with --trace)
! ERROR: Deploy failed.
-----> Cleaning up build
$ rm -rf "$build_path"
Unlinking current
$ rm -f "deploy.lock"
OK
! Command failed.
Failed with status 19
I'm sure set :rails_env, 'production' sets environment for rake and rails commands only, so try bundle_prefix.
In worst case move gem 'pg' to common section of Gemfile.
So, I cam across a error when pushing to heroku that I have not seen before. I am actively trying learn what the error means so I can fix it.
I see there there is issues with my sqlite3 but still cannot figure out a fix. After screwing up my gem files and then hours to get it back working on my local, I am here to ask for some help.
Any input would be greatly appreciated!
Haydens-MacBook-Air:TicketFee_Calculator haydengoldman$ git push heroku master
Initializing repository, done.
Counting objects: 215, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (197/197), done.
Writing objects: 100% (215/215), 291.41 KiB | 244.00 KiB/s, done.
Total 215 (delta 66), reused 0 (delta 0)
-----> Ruby app detected
-----> Compiling Ruby/Rails
-----> Using Ruby version: ruby-2.1.3
-----> Installing dependencies using 1.6.3
Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
Fetching gem metadata from https://rubygems.org/..........
Using json 1.8.1
Installing minitest 5.4.2
Installing i18n 0.6.11
Installing rake 10.3.2
Installing builder 3.2.2
Installing erubis 2.7.0
Installing rack 1.5.2
Installing arel 5.0.1.20140414130214
Installing mime-types 2.4.1
Installing sass 3.2.19
Installing coffee-script-source 1.8.0
Installing thor 0.19.1
Installing hike 1.2.3
Installing multi_json 1.10.1
Using bundler 1.6.3
Installing tilt 1.4.1
Installing thread_safe 0.3.4
Installing rails_serve_static_assets 0.0.2
Installing rdoc 4.1.2
Installing rails_stdout_logging 0.0.3
Installing rack-test 0.6.2
Installing bootstrap-sass 3.1.1.0
Installing execjs 2.2.1
Installing mail 2.6.1
Installing tzinfo 1.2.2
Installing sprockets 2.11.0
Installing coffee-script 2.3.0
Installing rails_12factor 0.0.2
Installing sdoc 0.4.1
Installing uglifier 2.5.3
Installing activesupport 4.1.6
Installing activemodel 4.1.6
Installing jbuilder 2.2.2
Installing actionview 4.1.6
Installing actionpack 4.1.6
Installing railties 4.1.6
Installing actionmailer 4.1.6
Installing activerecord 4.1.6
Installing sprockets-rails 2.1.4
Installing coffee-rails 4.0.1
Installing jquery-rails 3.1.2
Installing sass-rails 4.0.3
Installing turbolinks 2.4.0
Installing rails 4.1.6
Your bundle is complete!
Gems in the groups development and test were not installed.
It was installed into ./vendor/bundle
Post-install message from rdoc:
Depending on your version of ruby, you may need to install ruby rdoc/ri data:
<= 1.8.6 : unsupported
= 1.8.7 : gem install rdoc-data; rdoc-data --install
= 1.9.1 : gem install rdoc-data; rdoc-data --install
>= 1.9.2 : nothing to do! Yay!
Bundle completed (22.97s)
Cleaning up the bundler cache.
-----> Preparing app for Rails asset pipeline
Running: rake assets:precompile
DEPRECATION WARNING: Paths in SQLite3 database URLs of the form `sqlite3:///path` will be treated as absolute in Rails 4.2. Please switch to `sqlite3:dbname`. (called from <top (required)> at /tmp/build_4336c1c2-aef4-47f5-a267-de3bc5fa5690/Rakefile:6)
rake aborted!
Gem::LoadError: Specified 'sqlite3' for database adapter, but the gem is not loaded. Add `gem 'sqlite3'` to your Gemfile (and ensure its version is at the minimum required by ActiveRecord).
/tmp/build_4336c1c2-aef4-47f5-a267-de3bc5fa5690/vendor/bundle/ruby/2.1.0/gems/activerecord-4.1.6/lib/active_record/connection_adapters/connection_specification.rb:190:in `rescue in spec'
/tmp/build_4336c1c2-aef4-47f5-a267-de3bc5fa5690/vendor/bundle/ruby/2.1.0/gems/activerecord-4.1.6/lib/active_record/connection_adapters/connection_specification.rb:187:in `spec'
/tmp/build_4336c1c2-aef4-47f5-a267-de3bc5fa5690/vendor/bundle/ruby/2.1.0/gems/activerecord-4.1.6/lib/active_record/connection_handling.rb:50:in `establish_connection'
/tmp/build_4336c1c2-aef4-47f5-a267-de3bc5fa5690/vendor/bundle/ruby/2.1.0/gems/activerecord-4.1.6/lib/active_record/railtie.rb:129:in `block (2 levels) in <class:Railtie>'
/tmp/build_4336c1c2-aef4-47f5-a267-de3bc5fa5690/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/lazy_load_hooks.rb:38:in `instance_eval'
/tmp/build_4336c1c2-aef4-47f5-a267-de3bc5fa5690/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/lazy_load_hooks.rb:38:in `execute_hook'
/tmp/build_4336c1c2-aef4-47f5-a267-de3bc5fa5690/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/lazy_load_hooks.rb:28:in `block in on_load'
/tmp/build_4336c1c2-aef4-47f5-a267-de3bc5fa5690/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/lazy_load_hooks.rb:27:in `each'
/tmp/build_4336c1c2-aef4-47f5-a267-de3bc5fa5690/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/lazy_load_hooks.rb:27:in `on_load'
/tmp/build_4336c1c2-aef4-47f5-a267-de3bc5fa5690/vendor/bundle/ruby/2.1.0/gems/activerecord-4.1.6/lib/active_record/railtie.rb:118:in `block in <class:Railtie>'
/tmp/build_4336c1c2-aef4-47f5-a267-de3bc5fa5690/vendor/bundle/ruby/2.1.0/gems/railties-4.1.6/lib/rails/initializable.rb:30:in `instance_exec'
/tmp/build_4336c1c2-aef4-47f5-a267-de3bc5fa5690/vendor/bundle/ruby/2.1.0/gems/railties-4.1.6/lib/rails/initializable.rb:30:in `run'
/tmp/build_4336c1c2-aef4-47f5-a267-de3bc5fa5690/vendor/bundle/ruby/2.1.0/gems/railties-4.1.6/lib/rails/initializable.rb:55:in `block in run_initializers'
/tmp/build_4336c1c2-aef4-47f5-a267-de3bc5fa5690/vendor/bundle/ruby/2.1.0/gems/railties-4.1.6/lib/rails/initializable.rb:54:in `run_initializers'
/tmp/build_4336c1c2-aef4-47f5-a267-de3bc5fa5690/vendor/bundle/ruby/2.1.0/gems/railties-4.1.6/lib/rails/application.rb:300:in `initialize!'
/tmp/build_4336c1c2-aef4-47f5-a267-de3bc5fa5690/config/environment.rb:5:in `<top (required)>'
/tmp/build_4336c1c2-aef4-47f5-a267-de3bc5fa5690/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/dependencies.rb:247:in `require'
/tmp/build_4336c1c2-aef4-47f5-a267-de3bc5fa5690/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/dependencies.rb:247:in `block in require'
/tmp/build_4336c1c2-aef4-47f5-a267-de3bc5fa5690/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/dependencies.rb:232:in `load_dependency'
/tmp/build_4336c1c2-aef4-47f5-a267-de3bc5fa5690/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/dependencies.rb:247:in `require'
/tmp/build_4336c1c2-aef4-47f5-a267-de3bc5fa5690/vendor/bundle/ruby/2.1.0/gems/railties-4.1.6/lib/rails/application.rb:276:in `require_environment!'
/tmp/build_4336c1c2-aef4-47f5-a267-de3bc5fa5690/vendor/bundle/ruby/2.1.0/gems/railties-4.1.6/lib/rails/application.rb:389:in `block in run_tasks_blocks'
/tmp/build_4336c1c2-aef4-47f5-a267-de3bc5fa5690/vendor/bundle/ruby/2.1.0/gems/sprockets-rails-2.1.4/lib/sprockets/rails/task.rb:64:in `block (2 levels) in define'
Gem::LoadError: sqlite3 is not part of the bundle. Add it to Gemfile.
/tmp/build_4336c1c2-aef4-47f5-a267-de3bc5fa5690/vendor/bundle/ruby/2.1.0/gems/bundler-1.6.3/lib/bundler/rubygems_integration.rb:252:in `block in replace_gem'
/tmp/build_4336c1c2-aef4-47f5-a267-de3bc5fa5690/vendor/bundle/ruby/2.1.0/gems/activerecord-4.1.6/lib/active_record/connection_adapters/sqlite3_adapter.rb:5:in `<top (required)>'
/tmp/build_4336c1c2-aef4-47f5-a267-de3bc5fa5690/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/dependencies.rb:247:in `require'
/tmp/build_4336c1c2-aef4-47f5-a267-de3bc5fa5690/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/dependencies.rb:247:in `block in require'
/tmp/build_4336c1c2-aef4-47f5-a267-de3bc5fa5690/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/dependencies.rb:232:in `load_dependency'
/tmp/build_4336c1c2-aef4-47f5-a267-de3bc5fa5690/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/dependencies.rb:247:in `require'
/tmp/build_4336c1c2-aef4-47f5-a267-de3bc5fa5690/vendor/bundle/ruby/2.1.0/gems/activerecord-4.1.6/lib/active_record/connection_adapters/connection_specification.rb:188:in `spec'
/tmp/build_4336c1c2-aef4-47f5-a267-de3bc5fa5690/vendor/bundle/ruby/2.1.0/gems/activerecord-4.1.6/lib/active_record/connection_handling.rb:50:in `establish_connection'
/tmp/build_4336c1c2-aef4-47f5-a267-de3bc5fa5690/vendor/bundle/ruby/2.1.0/gems/activerecord-4.1.6/lib/active_record/railtie.rb:129:in `block (2 levels) in <class:Railtie>'
/tmp/build_4336c1c2-aef4-47f5-a267-de3bc5fa5690/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/lazy_load_hooks.rb:38:in `instance_eval'
/tmp/build_4336c1c2-aef4-47f5-a267-de3bc5fa5690/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/lazy_load_hooks.rb:38:in `execute_hook'
/tmp/build_4336c1c2-aef4-47f5-a267-de3bc5fa5690/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/lazy_load_hooks.rb:28:in `block in on_load'
/tmp/build_4336c1c2-aef4-47f5-a267-de3bc5fa5690/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/lazy_load_hooks.rb:27:in `each'
/tmp/build_4336c1c2-aef4-47f5-a267-de3bc5fa5690/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/lazy_load_hooks.rb:27:in `on_load'
/tmp/build_4336c1c2-aef4-47f5-a267-de3bc5fa5690/vendor/bundle/ruby/2.1.0/gems/activerecord-4.1.6/lib/active_record/railtie.rb:118:in `block in <class:Railtie>'
/tmp/build_4336c1c2-aef4-47f5-a267-de3bc5fa5690/vendor/bundle/ruby/2.1.0/gems/railties-4.1.6/lib/rails/initializable.rb:30:in `instance_exec'
/tmp/build_4336c1c2-aef4-47f5-a267-de3bc5fa5690/vendor/bundle/ruby/2.1.0/gems/railties-4.1.6/lib/rails/initializable.rb:30:in `run'
/tmp/build_4336c1c2-aef4-47f5-a267-de3bc5fa5690/vendor/bundle/ruby/2.1.0/gems/railties-4.1.6/lib/rails/initializable.rb:55:in `block in run_initializers'
/tmp/build_4336c1c2-aef4-47f5-a267-de3bc5fa5690/vendor/bundle/ruby/2.1.0/gems/railties-4.1.6/lib/rails/initializable.rb:54:in `run_initializers'
/tmp/build_4336c1c2-aef4-47f5-a267-de3bc5fa5690/vendor/bundle/ruby/2.1.0/gems/railties-4.1.6/lib/rails/application.rb:300:in `initialize!'
/tmp/build_4336c1c2-aef4-47f5-a267-de3bc5fa5690/config/environment.rb:5:in `<top (required)>'
/tmp/build_4336c1c2-aef4-47f5-a267-de3bc5fa5690/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/dependencies.rb:247:in `require'
/tmp/build_4336c1c2-aef4-47f5-a267-de3bc5fa5690/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/dependencies.rb:247:in `block in require'
/tmp/build_4336c1c2-aef4-47f5-a267-de3bc5fa5690/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/dependencies.rb:232:in `load_dependency'
/tmp/build_4336c1c2-aef4-47f5-a267-de3bc5fa5690/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.6/lib/active_support/dependencies.rb:247:in `require'
/tmp/build_4336c1c2-aef4-47f5-a267-de3bc5fa5690/vendor/bundle/ruby/2.1.0/gems/railties-4.1.6/lib/rails/application.rb:276:in `require_environment!'
/tmp/build_4336c1c2-aef4-47f5-a267-de3bc5fa5690/vendor/bundle/ruby/2.1.0/gems/railties-4.1.6/lib/rails/application.rb:389:in `block in run_tasks_blocks'
/tmp/build_4336c1c2-aef4-47f5-a267-de3bc5fa5690/vendor/bundle/ruby/2.1.0/gems/sprockets-rails-2.1.4/lib/sprockets/rails/task.rb:64:in `block (2 levels) in define'
Tasks: TOP => environment
(See full trace by running task with --trace)
!
! Precompiling assets failed.
!
! Push rejected, failed to compile Ruby app
To git#heroku.com:ancient-castle-6465.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git#heroku.com:ancient-castle-6465.git'
Heroku uses postgresql database, so remove the sqlite3 from the gem file or move it to the development group and add the gem 'pg' to your gem file. Regarding database.yml setting follow this Heroku setup
Make sure you have removed the sqlite3 gem from your Gemfile and ran bundle install.
If you continue to receive this error, check your Gemfile.lock as some gems list sqlite3 as a dependency - you'll want to remove those gems as well.
Gem::LoadError - You have already activated activesupport 3.0.3, but your Gemfile requires activesupport 3.0.0
/usr/lib/ruby/gems/1.8/gems/bundler-1.0.2/lib/bundler/runtime.rb:27:in `setup': You have already activated activesupport 3.0.3, but your Gemfile requires activesupport 3.0.0. Consider using bundle exec. (Gem::LoadError)
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.2/lib/bundler/spec_set.rb:12:in `each'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.2/lib/bundler/spec_set.rb:12:in `each'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.2/lib/bundler/runtime.rb:17:in `setup'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.2/lib/bundler.rb:100:in `setup'
from /home/maiordes/rails_apps/maiordesconto/config/boot.rb:8
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from /home/maiordes/rails_apps/maiordesconto/config/application.rb:1
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from /home/maiordes/rails_apps/maiordesconto/config/environment.rb:2
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from /home/maiordes/rails_apps/maiordesconto/daemons/ticket_handler.rb:6
Like the error says, did you consider using bundle exec? :)
Run commands through bundle exec to make sure the versions of Gems that are available are exactly what the Gemfile says are required.
For example:
bundle exec rails ...
bundle exec rake ...
Remove the specific version of the gem in the gemfile, and let the gem name be alone.