rails 3 app - emails not sending - ruby-on-rails

I've been setting up an rasil3 app that sends emails following this tutorial.
I've been working on it on two dev machines, one with passenegr/apache and the other using pow/apache. I'm working from the same git repo. I've not tried the app from Heroku/any other hosting yet.
The emails hae been sending from the machine with pow but not sending from the machine using passenger.
I've also been working on two different networks.
The machines are both osx. The one that is sending the emails is the most recent version of lion, the one that is not working is osx 10.6.7.
There are no errors showing in rails' development log. Should I be looking somewhere else?
Any idea why this would be the case? How should I debug something like this?

Related

Consistent problems with rails and Hartl’s tutorial

I've been trying to develop a web app for about a month now. I'm relatively new to web dev but I've been able to develop a pretty intuitive understanding of Rails since the beginning. However, I have run into many problems with the framework that seems to be unsolvable. Currently, I'm receiving a
[Routing Error: uninitialized constant StaticPagesController]
when running the site on my local server. I've followed the Hartl tut to a T(my files look exactly the same), and yet I'm running into these problems.
If some one could please tell me the optimal tech spec for running Rails on a MacBook Air, MacOS high Sierra 10.13.2

puma-dev link not working under Linux

I'm work on Linux and I develop a Ruby on Rails application.
I've set up the puma-dev seeing this page and they say, if you are working on Linux, please setup dev-tld-resolver.
I have completed both setups and I want to test if they work correctly.
I linked puma-dev to my Rails app and run it in the foreground with the -sysbind option. It runs, but if I type the URL (myapp.dev), it does not work.
How can I solve this problem?
I solved the problem myself.
The problem was Firefox. Firefox not support .dev domain so it couldn't connect to my application.
As I turn my app with Google Chrome, it executed correctly.

Heroku app works great on few computers but not the others. Could running "heroku restart" cause the issue?

I am running into a very odd issue and coming up short with identifying the issue. I don't even know if it is a front-end, server or Heroku issue.
I am managing a Rails App (with React front-end), hosting on Heroku. It is a workforce management and dispatching app. It has been working fine the whole time, until earlier today, when I made a huge feature deployment. The deployment was successful, and I tested the old & new features fine on all of our testing computers. After deployment, I ran heroku run rake db:migrate and heroku restart. During this time, we have customers using the web app on their local computers, in different time zones.
Few minutes later, I got a call from multiple customers, each mentioning that at least one of their dispatching features is not working, all of which were older features/components that shouldn't have been affected. Some say they cant see their workers. One say they cant see jobs on a particular day. Some say they cant see jobs on another. When I check the heroku logs, I see no errors whatsoever. Routes are called fine and things are passed correctly back to the front-end. When logging into their app with master credentials, we also were unable to replicate ANY of these issues on ANY of our computers. All of our customers uses Chrome, but checking on both Mac and Windows reveal no issues from our ends. Yet, the issue still remains.
We then decided to revert our deployment and deployed an earlier version. Same thing. Everything works on ours, and customers continue to say these features/components just appear...blank. We tried heroku run rake tmp:clear to clear heroku cache, still no luck.

Heroku PostgreSQL Database - inconsistent enties

i'm working on a Ruby on rails project adopted by another developer. It's deployed on heroku, uses heroku postgreSQL.
When i run the project on my local rails server with the remote database, it works fine. But there is one problem: I would like to delete some entries. So I tried to connect via PostgreSQL-Console. But it seems like the PostgrqSQL-Console gives me another version of the database than the one who is used by the app.
For example, the latest user ID in the app is 540 and in the database displayed by the console only 500.
Any idea? Thank you in advance.
Problem is solved. The elastic search index wasn't synchronized. Thank you for your help anyway.

Development workflow for Heroku?

I have used Heroku to push up my already coded Rails applications.
But now I wonder how the workflow would look like if I start coding a new Rails application from scratch.
For example if I use their addons (MongoHQ, Redis, Websolr, Sendgrid etc) in my application code, then I guess I shouldn't install MongoDB, Redis, Solr, Mail server etc in my local environment since they won't work with my code, correct?
So that means I have to push my app up to the Heroku platform to be able to run it in the web browser. That means, after a change of lines I have to commit and push it up.
If I'm correct, isn't this time-consuming since before I just changed the code and I could see the results in the browser immediately. Now I have to push for every change I want to see in browser.
You can install all of these locally - you should only need to specify different configurations when you are running in production rather than development.
For example, with Websolr, adding the following line in your initializer:
Sunspot.config.solr.url = ENV['WEBSOLR_URL'] if ENV['WEBSOLR_URL']
Will allow it to work both locally and on Heroku. See the docs for more information.
I can't tell for all addons, but the ones I used have very good fall-back mechanism for local deployment in development mode.
For example, Sendgrid will detect when you're using ActionMailer and send emails for you. You don't have to configure or call anything in your code. Locally you send emails as before (through sendmail or smtp server)
Same with exceptional (although you can invoke its API directly).
MongoHQ... Isn't it supposed to be replacement for PostgreSQL? Then, you should not care in most cases, just like you don't care about PostgreSQL running and not MySQL.

Resources