You do not seem to have attached the log, but rather than attach the
whole thing just copy/paste the relevant lines leading up to the
error. You do know that you must use postgres for heroku I hope. If
it is not that then also post database.yml.
You do not seem to have attached the log, but rather than attach the
whole thing just copy/paste the relevant lines leading up to the
error. You do know that you must use postgres for heroku I hope. If
it is not that then also post database.yml.
I have attached Gemfile, database.yml and heroku logs.doc file. Please
find it.
Please avoid heroku_logs.odt file, if it is not open.
No you haven't, at least I cannot see them. Please read my previous
message, just copy/paste the relevant lines of the log. Also
copy/paste database.yml. Gemfile is not required (at least not yet).
Also please confirm that you understand that you must use postgres.
I have attached Gemfile, database.yml and heroku logs.doc file. Please
find it.
No you haven't, at least I cannot see them. Please read my previous
message, just copy/paste the relevant lines of the log. Also
copy/paste database.yml. Gemfile is not required (at least not yet).
Also please confirm that you understand that you must use postgres.
I have copy/paste the relevant lines of the log and database.yml.
No you haven't, at least I cannot see them. Please read my previous
message, just copy/paste the relevant lines of the log. Also
copy/paste database.yml. Gemfile is not required (at least not yet).
Also please confirm that you understand that you must use postgres.
I have copy/paste the relevant lines of the log and database.yml.
Well I still don't see them. When I say copy/paste I mean to copy the
text out of the log or file and paste it into the message before you
send it. So you should be able to see the text in the message.
Also you *still* have not confirmed that you understand that you must
use postgres.
I have copy/paste the relevant lines of the log and database.yml.
Well I still don't see them. When I say copy/paste I mean to copy the
text out of the log or file and paste it into the message before you
send it. So you should be able to see the text in the message.
Also you *still* have not confirmed that you understand that you must
use postgres.
Yet you have specified sqlite as the database adapter.
Means I should use postgres as the database adapter in development. Is
it correct?
I presume you have worked through Heroku's guide [1]? If not then do
so. Also work right through a good tutorial such as railstutorial.org, which is free to use online, and includes setup on
Heroku I believe.
Jaimin – what’s on line app/controllers/orders_controller.rb:56 in your app ?
Whatever apperas on that link created a heroku error Errno::ECONNREFUSED
(Connection refused - connect(2))
(typically that kind of error happens when the rails app is unable to connect to an external service – like a database or redis, however, as you can see the exact service is unspecified in this log file example)
Since your issue appears to be a connectivity problem with the Heroku grid, I suggest you take it up with a support ticket with Heroku directly.
Typcially for my Heroku deploys I put the config/database.yml file in my .gitignore so it does not appear in the repository, and let Heroku write it directly since that mechanism is sure to write out what ever database you have set in your heroku config variables.
Finally, I would echo what clanlaw@gmail.com said in that Postgres is the default (and preferred) for Heroku. (Although he is incorrect that you “must use Postgres” – there are a number of alternative databases that can be found in the Heroku add-ons page.)
I presume you have worked through Heroku's guide [1]? If not then do
so. Also work right through a good tutorial such as railstutorial.org, which is free to use online, and includes setup on
Heroku I believe.
Thank you for your advise.I will read good tutorial link.
I have **sqlite** gem in development group and **pg** gem in production
group.
Could I use in this way?
Yes, but that's not enough. As Colin pointed out, you still are using the sqlite3 adapter in your database.yml file. You have to change that to pg as well, the gems and config have to match.
Jaimin -- what's on line app/controllers/orders_controller.rb:56 in your
app ?
In orders_controller.rb, line no. 56 as follow:
class OrdersController < ApplicationController
.
.
.
def create @order = Order.new(params[:order]) @order.add_line_items_from_cart(current_cart)
respond_to do |format| **# Line no. 52**
if @order.save
Cart.destroy(session[:cart_id])
session[:cart_id] = nil
OrderNotifier.received(@order).deliver ** #line number 56 **
format.html { redirect_to store_url, notice:
'Thank you for your order.' }
format.json { render json: @order, status: :created,
location: @order }
else @cart = current_cart
format.html { render action: "new" }
format.json { render json: @order.errors,
status: :unprocessable_entity }
end
end
end
.
.
.
end