Questions tagged [railsapps]

Questions and answers about applications from the RailsApps open source project.

Questions and answers about applications from the RailsApps open source project.

The RailsApps project provides example applications that developers use as starter apps.

The project also develops tools to create starter apps, including the Rails Composer application template and the rails_layout gem.

78 questions
17
votes
5 answers

Select enum from form to set role

Ruby on Rails 4.1 I am using Devise with enum role. It currently sets a defualt role when the User is created. I want to add a field to the form that creates Users to set the enum role. I read this but it doesn't say how to utilize the new…
DDDD
  • 3,790
  • 5
  • 33
  • 55
17
votes
2 answers

Wrong color for flash messages under Rails 4.1 with Bootstrap or Foundation

The following code displays Rails flash messages using Bootstrap 3.0: <%# Rails flash messages styled for Twitter Bootstrap 3.0 %> <% flash.each do |name, msg| %> <% if msg.is_a?(String) %>
8
votes
3 answers

Are Rails Brick or Rails Composer widely used?

I'm new to Ruby on Rails and have been seeing people use auto boilerplate generators like Rails Brick or Rails Composer to create boilerplate user-management systems, etc. Coming from a background that doesn't trust auto-generated code, is it…
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
5
votes
3 answers

Sass is breaking on @extend ".bg-faded"

I used Rails Composer to create a skeleton application for the rails-devise-roles project described here: https://github.com/RailsApps/rails-devise-roles I'm getting a 500 error generated by the following: Sass::SyntaxError - ".authform form" failed…
Don Brown
  • 49
  • 2
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

Make the Devise new user form created with railapps a partial to re use it

I've created a new app with the Rails App composer with Devise and Pundit. The composer has created a form to create new users (devise/registrations/new.html.erb) which i would like to make a partial so i can put it on other pages. The form is …
Nicola Peluchetti
  • 76,206
  • 31
  • 145
  • 192
3
votes
2 answers

Where is user.admin? defined in rails-devise-pundit starter app?

I used RailsApps rails-composer to create a rails-devise-pundit starter application. I am still a little new to ruby on rails and newer to devise, pundit and rails 4. I was looking at the code to learn how it works. There are many places in…
Mike F.
  • 69
  • 1
  • 9
2
votes
2 answers

Where is the .bashrc file on Windows? (Daniel Kehoe's learn-rails tutorial book)

I previously asked a similar question with regards to cloud9, but I am now trying to do the same project in parallel on my windows 10 machine because I will not have internet access to use cloud9. I am trying to set up the configuration in…
Owen
  • 361
  • 1
  • 5
  • 16
2
votes
1 answer

Codeship breaks on rails-devise-roles tests

The rails-devise-roles app's Selenium tests for user-delete-spec.rb and user-edit-spec.rb seems to break when running in Codeship's CI. The rspec works fine on my local machine, but breaks in Codeship. The rspec output I get is as…
2
votes
1 answer

Twitter OAuth::Unauthorized 400 Bad Request, doing RailsApps Oauth tutorial

I'm working on the RailsApps Oauth tutorial, and cannot figure out how to not get a Twitter OAuth::Unauthorized 400 Bad Request when visiting /auth/twitter. Everything was exactly as https://github.com/RailsApps/rails-omniauth. Have spent hours…
tmkiefer
  • 215
  • 1
  • 2
  • 10
2
votes
1 answer

How to set up authorization policies for two controllers using Pundit?

I'm learning Pundit using the RailsApps Pundit Tutorial and this statement from the tutorial totally confused me: Given that the policy object is named UserPolicy, and we will use it for authorization from the Users controller, you might wrongly…
2
votes
1 answer

undefined method `plan_class' for nil:NilClass after setting up Rails Composer

I am getting this error when a user tries to sign up. I have not changed any file after using the rails composer, but still get the error.
<%= form_for(resource, :as => resource_name, :url =>…
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
1
2 3 4 5 6