Deploy Heroku Using Mongo

Can someone tell me what I'm doing wrong? I am trying to push a simple rails application to Heroku that uses MongoDB. My gemfile contains the following line:

gem "mongo"

When clicking on an application in Heroku, this is an error: there is no such file to download - mongo

-----> Heroku receiving push
-----> Rails app detected
-----> Detected Rails is not set to serve static_assets
       Installing rails3_serve_static_assets... done
-----> Gemfile detected, running Bundler version 1.0.3
       Unresolved dependencies detected; Installing...
       /usr/ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': no such file to load -- mongo (LoadError)

Here is my whole gemfile:

require 'rubygems'
require 'mongo'
source 'http://gemcutter.org'

gem "rails", "3.0.0"
#gem 'rails', :git => 'http://github.com/rails/rails.git'

gem "mongo_mapper"
gem 'mongoid', '2.0.0.beta.20'
gem 'devise', :git => 'git://github.com/plataformatec/devise.git'
gem 'heroku', '1.13.7'


# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
+3
source share
2 answers

You do not need any of these lines in your Gemfile:

require 'rubygems'
require 'mongo'

None of these are required for the bundle to upgrade or install your gems.

Also, is there a reason why you are installing both mongoid and mongo_mapper?

+6
source

, , , - - https://mongolab.com, ( rails). MongoLabs , ( JS). , :)

0

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


All Articles