Questions tagged [learn-ruby-on-rails]

Questions and answers related to the book "Learn Ruby on Rails" by Daniel Kehoe.

Questions and answers for the book Learn Ruby on Rails by Daniel Kehoe. The book is available at learn-rails.com.

33 questions
7
votes
7 answers

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 it's telling me that rails isn't installed. So I…
trick420
  • 237
  • 3
  • 9
7
votes
2 answers

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 form, instead of getting an email in my mailbox, I'm…
Toontje
  • 1,415
  • 4
  • 25
  • 43
6
votes
2 answers

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/ Google because…
Katie
  • 478
  • 2
  • 15
5
votes
3 answers

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 connection =…
user3186432
  • 51
  • 1
  • 3
4
votes
4 answers

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 server', I get the following: trick420$ rails…
trick420
  • 237
  • 3
  • 9
3
votes
3 answers

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. Below is my code: user_mailer.rb class UserMailer <…
3
votes
1 answer

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 .json file? I know if I do: def index …
TABISH KHAN
  • 1,553
  • 1
  • 19
  • 32
3
votes
2 answers

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, subject: "Website Contact") end end and the…
2
votes
1 answer

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#create undefined method `new'…
yotta1
  • 285
  • 1
  • 2
  • 7
2
votes
3 answers

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 "Deploy" chapter, but when I run git push heroku…
trick420
  • 237
  • 3
  • 9
2
votes
3 answers

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 variables (which are read from ENV in the shell)…
1
vote
1 answer

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 local repository. They just won't show up on my…
karan satia
  • 307
  • 4
  • 16
1
vote
1 answer

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 check Google Drive I am not seeing a created…
1
vote
2 answers

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, creating an application that is supposed to subscribe…
user4325086
1
vote
1 answer

'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 work. Any idea what is happening here? Heroku open…
brntsllvn
  • 931
  • 11
  • 18
1
2 3