Houssein abil
Joined
Activity
I have a rails app. And of course, the development database is different from the prod database but the code is the same. So now I downloaded the prod database and I want to add it to the development database on local so I can play around with the new features with a real database. But since two days I'm struggling to find the way the prod data to local
Posted in Please help!!! My App is Down
Noted! I like the forum here that I always forget about contacting the support of Hatchbox first
Posted in Please help!!! My App is Down
Hello my app is down this morning saying 500 Internal Server Error
If you are the administrator of this website, then please read this web application's log file and/or the web server's log file to find out what went wrong.
I went on Hatchbox to check the logs, its long and I really don't know where the error is, nor how to solve it. Please help
Posted in Hatchbox Postgres Problem
I would like to understand, when you talk about my server running out of memory, which server are you talking about? (the one I choose from Digital Ocean or my plan on Hatchbox). If you want we close the discussion here and continue via Hatchbox Support link
Posted in Hatchbox Postgres Problem
Great thanks will use the Hatchbox support link to move further
Posted in Hatchbox Postgres Problem
Hello,
I have my app running on Hatchbox. I link it with the app hosted on Github so anytime that I push something on my master branch, its deploy automatically. Yesterday I did some modification in one of .html.erb file (I just change h1 name from project to list of project). Since then all the deployments of my app failed and now the whole app is not running. I check the log and I see this error
PG::ConnectionBad (could not connect to server: Connection refused Is the server running on host "127.0.0.1" and accepting TCP/IP connections on port 5432?
Postgresql is provided by Hatchbox so I don't know how to solve it. Any help please
Posted in Phusion Passenger error on Hatchbox
Hello I finally find a solution. The problem was due to active storage. In production active storage was not enabled. So I delete all the table fo active storage (blobs and attachements) then I reinstall the active_storage, run the migration and now everyhting works
Posted in Phusion Passenger error on Hatchbox
I use this code to go through the error and I finally find those lines
ActionView::Template::Error (PG::UndefinedTable: ERROR: relation "active_storage_attachments" does not exist
and
Missing service adapter for "S3" (RuntimeError)
Posted in Phusion Passenger error on Hatchbox
This what I'm getting now on the whole app
And this what is in the log
deploy@crimson-cloud-3915:~$ tail ~/centcode/current/log/production.log
[fecd54fa-e891-4c21-9ce3-4f930fc9632b] /usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler/thread_handler.rb:110:in `main_loop'
[fecd54fa-e891-4c21-9ce3-4f930fc9632b] /usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler.rb:415:in `block (3 levels) in start_threads'
[fecd54fa-e891-4c21-9ce3-4f930fc9632b] /usr/lib/ruby/vendor_ruby/phusion_passenger/utils.rb:113:in `block in create_thread_and_abort_on_exception'
I, [2020-02-11T16:11:54.749216 #21670] INFO -- : [64574b3e-1a14-42f3-8801-dfe9903c2a58] Started GET "/" for 154.73.65.17 at 2020-02-11 16:11:54 +0000
I, [2020-02-11T16:11:54.753129 #21670] INFO -- : [64574b3e-1a14-42f3-8801-dfe9903c2a58] Processing by ProjectController#index as HTML
I, [2020-02-11T16:11:54.762839 #21670] INFO -- : [64574b3e-1a14-42f3-8801-dfe9903c2a58] Completed 401 Unauthorized in 9ms (Allocations: 387)
D, [2020-02-11T16:33:52.684583 #22642] DEBUG -- : (0.4ms) SELECT pg_try_advisory_lock(4761540374926607370)
D, [2020-02-11T16:33:52.700000 #22642] DEBUG -- : (1.0ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
D, [2020-02-11T16:33:52.710371 #22642] DEBUG -- : ActiveRecord::InternalMetadata Load (0.5ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]
D, [2020-02-11T16:33:52.716745 #22642] DEBUG -- : (0.8ms) SELECT pg_advisory_unlock(4761540374926607370)
deploy@crimson-cloud-3915:~$
Posted in Phusion Passenger error on Hatchbox
Hello,
I have just deployed my app successfully on Hatchbox. Its works perfectly but when I try to access a page via activeadmin, I get this error and I definitely don't understand it nor what do. Some help please
2d733fc7-8ca0-4625-874b-3929985cd478] activesupport (6.0.2.1) lib/active_support/cache/strategy/local_cache_middleware.rb:29:in `call'
[2d733fc7-8ca0-4625-874b-3929985cd478] actionpack (6.0.2.1) lib/action_dispatch/middleware/executor.rb:14:in `call'
[2d733fc7-8ca0-4625-874b-3929985cd478] rack (2.1.2) lib/rack/sendfile.rb:113:in `call'
[2d733fc7-8ca0-4625-874b-3929985cd478] actionpack (6.0.2.1) lib/action_dispatch/middleware/host_authorization.rb:77:in `call'
[2d733fc7-8ca0-4625-874b-3929985cd478] railties (6.0.2.1) lib/rails/engine.rb:526:in `call'
[2d733fc7-8ca0-4625-874b-3929985cd478] /usr/lib/ruby/vendor_ruby/phusion_passenger/rack/thread_handler_extension.rb:97:in `process_request'
[2d733fc7-8ca0-4625-874b-3929985cd478] /usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler/thread_handler.rb:149:in `accept_and_process_next_request'
[2d733fc7-8ca0-4625-874b-3929985cd478] /usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler/thread_handler.rb:110:in `main_loop'
[2d733fc7-8ca0-4625-874b-3929985cd478] /usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler.rb:415:in `block (3 levels) in start_threads'
[2d733fc7-8ca0-4625-874b-3929985cd478] /usr/lib/ruby/vendor_ruby/phusion_passenger/utils.rb:113:in `block in create_thread_and_abort_on_exception'
Works like a charm. Thanks @chris Oliver. You are our hero. I have been strugling with this since Saturday
I'm trying to paginate a result of an iteration using Kaminari. The pagination is showing well but its not cutting it into another page. All is showing on the same page even when I click on page 2, it still the same result as page 1
I'm using rails 6 and ruby 2.5
in my controller i have this
def dashboard
user_gigs = current_user.gigs
@user_gigs_pager = Kaminari.paginate_array(user_gigs).page(params[:page]).per(4)
end
then in my view I call the paginate
<div class="card">
<div class="card-header-title is-centered">
<%= paginate @user_gigs_pager %>
</div>
</div>
this my full view code
<% current_user.gigs.each do |gig| %>
<%# <% user_gigs = current_user.gigs %>
<div class="column is-one-third">
<div class="card">
<div class="card-image">
<%= link_to edit_gig_path(gig) do %>
<figure class="image is-4by3">
<!-- Gig Cover Image Here -->
<%= image_tag gig_cover(gig) %>
</figure>
<% end %>
</div>
<div class="card-content p-t-5 p-b-5">
<p class="subtitle is-6 m-b-5"><%= link_to gig.title.truncate(20), gig_path(gig) %></p>
<span class="star-review"><i class="fa fa-star"></i>
<%= gig.average_rating %> <span class="star-review">(<%= gig.reviews.count %>)</span>
</span>
</div>
<footer class="card-footer">
<p class="deletegig">
<%= link_to destroy_gig_path(gig), method: :delete, data: { confirm: "are you sure"} do %>
<span class="icon has-text-danger">
<i class="far fa-trash-alt"></i>
</span>
<% end %>
</p>
<% basic_price = gig.pricings.find{ |p| p.pricing_type == 'basic' }%>
<a class="has-text-danger is-block card-footer-item has-text-right">
<% if !basic_price.nil? %>
<span class="small-title">Points</span> <i class="fab fa-bitcoin"></i>
<strong><%= basic_price.price %></strong>
<% else %>
<strong>
<span class="small-title has-text-dark">Pas de point</span>
</strong>
<% end %>
</a>
</footer>
</div>
</div>
<% end %>
</div>
</div>
</div>
<div class="card">
<div class="card-header-title is-centered">
<%= paginate @user_gigs_pager %>
</div>
</div>