Your gemfile lists a gem more than once. may cause errors

I am currently receiving these messages below when I start the installation of the package

Your Gemfile lists the gem sqlite3 (= 1.3.5) more than once.
You should probably keep only one of them.
While it not a problem now, it could cause errors if you change the version of just one of them later.

Your Gemfile lists the gem rspec-rails (= 2.10.0) more than once.
You should probably keep only one of them.
While it not a problem now, it could cause errors if you change the version of just one of them later.

Your Gemfile lists the gem rspec-rails (= 2.10.0) more than once.
You should probably keep only one of them.
While it not a problem now, it could cause errors if you change the version of just one of them later.

Your Gemfile lists the gem pg (= 0.12.2) more than once.
You should probably keep only one of them.
While it not a problem now, it could cause errors if you change the version of just one of them later.

I use Postgresql with Heroku, and I believe that I use Postgresql in both my development and testing. I recently switched / switched from sqlite to postgresql.

Do I still need to create sqlite3 stones in: development or in: development ,: test?

And finally, is there a difference between: development and: development ,: test?

database.yml

development:
  adapter: postgresql
  encoding: unicode
  database: xxxxxx_development
  pool: 5
  username: xxxxxx
  password:

test:
  adapter: postgresql
  encoding: unicode
  database: xxxxxx_development
  pool: 5
  username: xxxxxx
  password:

Gemfile

gem 'rails', '3.2.11'
gem "bootstrap-sass"
gem 'will_paginate'
gem 'bootstrap-will_paginate', '0.0.6'

gem 'pg', '0.12.2'
gem 'pg_search'

group :development, :test do
  gem 'sqlite3', '1.3.5'
  gem 'rspec-rails', '2.10.0'
  gem 'guard-rspec', '0.5.5'
end

group :development do
  gem 'sqlite3', '1.3.5'
  gem 'rspec-rails', '2.10.0'
end

# Test gems on Macintosh OS X
group :test do
  gem 'rspec-rails', '2.10.0'
end

group :production do
  gem 'pg', '0.12.2'
  gem 'rack-google_analytics'
end
+4
source share
3 answers

You repeat the placement of sqlite in the development team here:

group :development, :test do
  gem 'sqlite3', '1.3.5'
  gem 'rspec-rails', '2.10.0'
  gem 'guard-rspec', '0.5.5'
end

group :development do
  gem 'sqlite3', '1.3.5'
  gem 'rspec-rails', '2.10.0'
end

, - . , pg , - .

gemfile :

gem 'rails', '3.2.11'
gem "bootstrap-sass"
gem 'will_paginate'
gem 'bootstrap-will_paginate', '0.0.6'

# gem 'pg', '0.12.2'
gem 'pg_search'

group :development, :test do
  gem 'sqlite3', '1.3.5'
  gem 'rspec-rails', '2.10.0'
end

group :test do
  gem 'guard-rspec', '0.5.5'
end

group :production do
  gem 'pg', '0.12.2'
  gem 'rack-google_analytics'
end

, -, : , . , postgres, , , . - (, iirc) PG SQLite.

sqlite:

gem 'rails', '3.2.11'
gem "bootstrap-sass"
gem 'will_paginate'
gem 'bootstrap-will_paginate', '0.0.6'

gem 'pg', '0.12.2'
gem 'pg_search'

group :development, :test do
  gem 'rspec-rails', '2.10.0'
end

group :test do
  gem 'guard-rspec', '0.5.5'
end

group :production do
  gem 'rack-google_analytics'
end
+4

pg , sqlite3.

: development : development,: test , : development,: test - , .: : .

+1

You have gem sqlite3, pg, respec-rails more than once in the same environment, you need to remove duplication of the same gem.

Modify the gem file as follows:

gem 'rails', '3.2.11'
gem "bootstrap-sass"
gem 'will_paginate'
gem 'bootstrap-will_paginate', '0.0.6'


group :development, :test do
  gem 'sqlite3', '1.3.5'
  gem 'rspec-rails', '2.10.0'
  gem 'guard-rspec', '0.5.5'
end


group :production do
  gem 'pg', '0.12.2'
end
+1
source

Source: https://habr.com/ru/post/1525751/


All Articles