Questions tagged [learn-ruby-on-rails]
Questions and answers related to the book "Learn Ruby on Rails" by Daniel Kehoe.
33
questions
0
votes
0
answers
70
views
Why are my validations not working in rails app? (Daniel Kehoe's Learn Rails Tutorial Book)
I am on chapter 19 of the learn rails book by Daniel Kehoe and have created a form. However when I deliberately make errors in order to test the validations no messages appear. for example when I ...
0
votes
3
answers
166
views
Syntaxis error when Start Rails Server after first configuration
I am trying to run
rails server
and I get the following error after the first configuration:
=> Booting WEBrick
=> Rails 4.2.6 application starting in development on http://localhost:3000
=&...
0
votes
1
answer
888
views
Sendgrid returns SMTP-AUTH requested but missing user name
I am new to ruby on rails and I follow the book Learn-ruby-on-rails by Daniel Kehoe. I have set up my sengrid login details correctly on the Ubuntu enviroment. echo $ SENDGRID_USERNAME returns my ...
0
votes
1
answer
2k
views
Why do I get: An SMTP To address is required to send a message. "Set the message smtp_envelope_to, to, cc, or bcc address."?
I am following the learn Ruby on Rails book by Daniel Kehoe and when I try to send mail, I get the following error.
ArgumentError at /contacts An SMTP To address is required to send a
message. ...
0
votes
1
answer
251
views
learn-ruby-on-rails tutorial, mailchimp not sending any emails
I've been following the tutorial and have already reach deployment on heroku.
The contact forms work perfectly and no errors messages are displaying.
When I use the sign up button the success message ...
3
votes
3
answers
610
views
Error "An SMTP To address is required to send a message" on Learn-Rails Tutorial
I keep getting error on "Send Mail" section on the Learn Ruby on Rails tutorial.
I have tried to clone https://github.com/RailsApps/learn-rails.git on my local machine but the issue is still here.
...
3
votes
1
answer
1k
views
How to convert Ruby on Rails Model to a .json file?
If I have a basic ruby on rails model set up (like for example the typical blogpost application) with an index action like:
def index
@blogs=Blog.all
end
How do I convert all the blogs into a ....
2
votes
1
answer
133
views
RoR - NoMethodError in ContactsController
I'm following the Learn Ruby on Rails tutorial from RailsApps, chapter 22 "SPREADSHEET CONNECTION".
After doing all as the book and the git shows I get this error
NoMethodError in ContactsController#...
0
votes
0
answers
182
views
Authentication failed for : Response code 403 for post - Error=BadAuthentication
In my contact controller(app/model/contact.rb), it seem correct way to connect and save data to a spreadsheet on my google drive, I try to run it locally, I kept getting error messages and haven't ...
1
vote
1
answer
3k
views
I can only push changes to local repository
Going through Daniel Kehoe's Learn Ruby on Rails book and I've installed and configured github on my macbook. My problem is that I'm not sure why my changes are only being committed and pushed to my ...
0
votes
1
answer
333
views
Instantiate a ruby class no initialize method but with attr_accesors?
The following code works but I don't understand why.
The Model: I have a Class called Contact that doesn't have an initialize method (i.e it inherits the initialize method from the default Object ...
0
votes
1
answer
151
views
When sending an email through my Rails app using ActionMailer I get the email from myself despite of specifying the 'from:' argument
I am following the Learn Ruby on Rails book from the RailsApps project. On Chapter 23 we add the send mail functionality to the app. Everything seems to be working fine expect that the email I ...
0
votes
1
answer
41
views
Giving a 'test drive' to the app before following the book 'learn-ruby-on-rails'
I've been following Daniel Kehoe's book Learn Ruby on Rails and it is amazing.
I wanted to give the finished official app a test drive before continuing to better understand where I'm heading to, ...
6
votes
2
answers
2k
views
Environment variables are nil in Rails app (can't connect to Google Drive)
Working with the book Learn Ruby on Rails, I'm stuck on the section of the tutorial where you connect to Google Drive to save the form submission to a spreadsheet.
I'm not able to authenticate w/ ...
1
vote
1
answer
145
views
Spreadsheet Connection section, won't create the spreadsheet
While working on Daniel Kehoe's Learn Ruby on Rails book, I got to the spreadsheet connection section. I followed the workaround for google drive and I get the message sent flash notice, but when I ...
0
votes
0
answers
465
views
Gibbon::MailChimp Error (Invalid MailChimp List ID: ) - Learn Ruby On Rails - Kehoe
I'm nearly done with the Learn Ruby on Rails tutorial by Daniel Kehoe, but am having an issue after deploying to Heroku. Run from Nitrous, the app works perfectly, allowing me to sign up for a ...
3
votes
2
answers
143
views
Ruby class vs instance method confusion
Given the class:
class UserMailer < ActionMailer::Base
default from: "do-not-reply@mark.com"
def contact_email(contact)
@contact = contact
mail(to: 'm@mark.com', from: @contact.email, ...
1
vote
2
answers
283
views
Heroku needs different code to set environmental variable but why?
For the first time I have a question to an answer I already solved, this is more about WHY my little fix solved it in the first place.
I'm following the Learn Rails book tutorial by Daniel Kehoe, ...
1
vote
1
answer
701
views
'Learn Ruby on Rails' tutorial: Can't submit contact form
I am getting the error below following the tutorial in the book Learn Ruby on Rails.
I am able to launch my app manually by typing the URL into my browser but am wondering why Heroku open does not ...
1
vote
1
answer
164
views
Nitrous.io google_drive gem "Authentication failed" error
I am trying to utilize the google_drive gem in a Rails app and am getting the following error:
"Authentication failed for [my_email_address]@gmail.com: Response code 403 for post https://www.google....
1
vote
1
answer
2k
views
Receiving syntax error message when trying to start application server for first Rails application after configuration [noob]
The following message pops up when I enter $ rails server in the Terminal (Mac, running latest version of Yosemite). I'm pretty lost, other topics have recommended altering the text in the config ...
1
vote
2
answers
404
views
Learn Ruby on Rails book: email configuration using TextEdit
I was on page 147 (epub) of Kehoe's Learn Ruby on Rails book and copied this code to config/environments/development.rb:
config.assets.debug = true
config.action_mailer.smtp_settings = {
...
1
vote
0
answers
46
views
RailsLayout gem doesn't create expected files
Following the example in the book Learn Ruby on Rails, I ran rails generate layout:install foundation5 --force
and then checked for the framework_and_overrides.css.scss file in the app/assets/...
2
votes
3
answers
193
views
Unable to push Rails Bootstrap project to Heroku
I'm finished up with the railsapps.org tutorial on Rails and Bootstrap. I am not able to deploy it to Heroku though. My code is exactly as the tutorial, and I followed the directions exactly in the "...
1
vote
3
answers
102
views
Rails - Closed terminal and rebooted machine - now bash tells me rails isn't installed
Running OSX Mavericks, ruby 2.1.1p76 (2014-02-24 revision 45161) [x86_64-darwin13.0], rvm 1.25.23 (master), and rails-4.1.0 (allegedly)
I'm working through the railsapps.org book on learning rails ...
1
vote
2
answers
375
views
I need to start over with a fresh, ground zero, install of Rails. How do I do that?
Running Mac OS X Mavericks, I have completely jacked up my Rails installation to the point that I am unable to sort out what all is wrong. I'm working through the railsapps.org book on learning rails ...
2
votes
3
answers
4k
views
Issues using config/secrets.yml variable set from ENV variable on Rails 4.1.0
Have not played with Rails in ages so walking through the Learn Ruby on Rails tutorial which is excellent.
I'm having issues with google authentication, the example code calls the config/secrets.yml ...
7
votes
7
answers
8k
views
Can't install rails - "File exists @ dir_s_mkdir" error
I have had rails installed and almost working. Was working on a solution to another problem with I accidentally closed the bash window. So I reopened it, and now I am unable to use rails at all and ...
4
votes
4
answers
5k
views
Cannot launch rails server - uninitialized constants Sprockets::Rails::VERSION::(NameError)
I am simply trying to go through the railsapps.org Learn Ruby on Rails book online. I have everything installed and am stuck at "Launching the Web Server" in the tutorial.
When I execute '$ rails ...
6
votes
2
answers
6k
views
SMTP-AUTH requested but missing user name
currently I'm doing Daniel Kehoe's Learn Ruby on Rails tutorial. One of the exercises is to send a contact form from the Contact page using Google's Gmail account.
However, when I sent the contact ...
1
vote
1
answer
1k
views
Rails_Layout "Could Not Find Layout Generator"
I'm trying to use this command in Terminal: rails generate layout simple --force and when I do I get this error: Could not find generator layout. So I attempted to try to be more specific in my ...
0
votes
2
answers
3k
views
Rails contact form send email to myself
I'm following a paid tutorial exactly and setting up a contact page where when a visitors fills out the form and submits, I, the website owner, get an email with their name, email, and comment. The ...
5
votes
3
answers
4k
views
Bad Authentication Error Rails connecting to google drive
I have a contacts controller which has a method to connect and save the data submitted from the form to a spreadsheet in my account on google drive (app/models/contact.rb):
def update_spreadsheet
...