Adalberto Caldeira
Joined
Activity
The erros is in local hard drive. Please could you review my code at github.com/adalbertobrant /schedule_tweets
I am new at rails and just complete Chris tutorial in gorails.com => schedule_tweets. But I could not send any tweet , I did the UTC modification for america/brasilia, when I make a schedule tweet this error is showed in my screen. I am lost. How could I try to fix it ?
after_save_commit do
if publish_at_previously_changed?
TweetJob.set(wait_until: @tweet.publish_at).perform_later(self)
end
end
Rails.root: /home/adalberto/Documents/railsForBeginners/scheduled_tweets
Application Trace | Framework Trace | Full Trace
app/models/tweet.rb:16:in block in <class:Tweet>'
create'
app/controllers/tweets_controller.rb:15:in
Request
Parameters:
{"authenticity_token"=>"[FILTERED]",
"tweet"=>{"twitter_account_id"=>"3", "body"=>"hello", "publish_at(1i)"=>"2021", "publish_at(2i)"=>"2", "publish_at(3i)"=>"18", "publish_at(4i)"=>"20", "publish_at(5i)"=>"21"},
"button"=>""}
Thanks Cris I think I have something wrong cause the schedule tweets is not sending tweet at all. I have change the UTC to America/Brasilia. Could give me some advice in my https://github.com/adalbertobrant/scheduled_tweets
after_save_commit do
if publish_at_previously_changed?
TweetJob.set(wait_until: @tweet.publish_at).perform_later(self)
end
end
Rails.root: /home/adalberto/Documents/railsForBeginners/scheduled_tweets
Hi anyone to help me with this error?
Hello fellow friends. In my case I did all wrong but in the end I finished.
Here are the stackoverflow => https://stackoverflow.com/questions/23338356/pgconnectionbad-fatal-role-myname-does-not-exist
When I was doing the creation and migration command at rails I bumped with this mistake , so locally I managed to create a super user to my postgresql , I do no know it is ok , but solved the problem.
sudo -u postgres createuser --superuser YOURUSERNAME_HERE
Thanks for the time Cris , great content.
For linux I installed only redis , and start the redis manually, then rails s and then sidekiq
Many thanks , I am going to configure my UTC time.
Hi Cris, my problem is: If I want to disconect it is giving me an error.
ActiveRecord::InvalidForeignKey in TwitterAccountsController#destroy
SQLite3::ConstraintException: FOREIGN KEY constraint failed
I think it is for the update tweet_id: tweet_id
I think for sending information it is true, maybe we need to put this button to do some action.
having this error now SQLite3::ConstraintException: FOREIGN KEY constraint failed
How to fix it?
I do not know if it is the right way to do it . I comment the if form.object.persisted? and add this in the edit
<%= form_with model: @tweet do |form| %>
<% if form.object.persisted? %>
<%= button_to "Delete", form.object, method: :delete, data: {confirm: "Are you sure?"}, class: "btn btn-outline-danger" %>
<%end%>
<%end%>
But now my button is not side by side.
I think it is because tweet_params in the video Cris explain that when we click edit tweet it is only in memory maybe is that.
Same here!
<% if Current.user.twitter_accounts.none? %>
<%= link_to "Connect your Twitter Account", "/auth/twitter",method: :post, class: "btn btn-primary" %>
<% end %>
I do not know Alex, because I am new at rails , but I think for now it is a good idea.
Cris answered in episode 27 just go there and fix the error in the class omniauth. Great work Cris.
Many thanks I have this doubt in episode 25 and now I know how to solve it, thanks.