ruby-on-rails-5 Questions
1
Solved
I'm upgrading to Rails 5, which has broken my RSpec even though I'm passing the data I should be.
The problem is obviously here:
expected: ({"name"=>"MyString"})
got: (<ActionController::Pa...
Unmistakable asked 24/7, 2016 at 22:38
3
Solved
I had a rails app which was running perfectly with devise 3 and rails 4. I updated rails to 5 and it gave DEPRECATION WARNING: alias_method_chain is deprecated. So i had to change the devise versio...
Monoacid asked 14/2, 2016 at 16:41
2
Solved
I'm new to Rails and have a couple questions about validating parameters and returning error responses. I want to create a JSON API using the new Rails 5 API mode.
As far as I can tell, Rails rec...
Cone asked 18/7, 2016 at 8:46
1
Solved
I'm trying to sign in an existing user using devise_token_auth version 0.1.38, but I'm hitting an IndexError: string not matched in the library's sessions_controller.
IndexError (string not match...
Courbevoie asked 17/7, 2016 at 17:34
1
Solved
I noticed that when generating data migration in Rails 5, some people use rails db:migrate over rake db:migrate. Can someone explain the difference between the rails and the rake command in databas...
Namnama asked 15/7, 2016 at 19:11
1
Solved
As of Rails 5, API gem is in merged in.
Now, what does that leave us with in case I have API to call via AJAX from the webpage? I'm looking for a best practice here. Surely, I can make a route wit...
Garton asked 7/7, 2016 at 16:10
1
Solved
I have quite a bit of experience developing Rails 4 apps on Mac OS X + Docker Machine + Docker Compose, but something has changed with how Rails 5 is caching files in the development environment (c...
Confessedly asked 10/5, 2016 at 16:27
2
Solved
I'm using the Rails 5 beta 3 with action cable, the integration works fine in development but when I try to run a feature test through capybara, it doesn't seem to hit the channel actions.
I'm usi...
Eucharis asked 9/3, 2016 at 16:28
1
Solved
I know this has been asked many times, but the answers are never fully acceptable to me.
So I am following Ryan Bates' Railscast about this topic, and mixing that with the official Devise Omniauth...
Abigael asked 1/7, 2016 at 1:30
3
I have and rails application and a rake task which I'm going to execute by cron around once in an hour. But the thing is that the task uses rails environment and some classes of my rails applicatio...
Friedland asked 1/7, 2016 at 6:20
2
Solved
I built a very simple app using Rails 5 beta 1 and ActionCable to show when users come online and let them send messages to each other.
Now, I would basically like to take the client-side part of...
Sackcloth asked 10/2, 2016 at 16:33
1
Solved
I need to validate the presence of some text in a specific part of the page.
expect(page).to will output too much text, it is especially annoying for the page which hold the terms of agreement, wh...
Brickkiln asked 26/6, 2016 at 21:54
2
Solved
I am having this issue with rails 5 rc1. Does anyone have any idea how to configure it in the environment files and what is the default connection pool size for rails 5 active record.
Puma caught...
Twentyfour asked 24/6, 2016 at 2:18
1
I'm using the Rails 5 ApplicationController.renderer.render method to render from within a model. I need to pass some variables to my layout which I have done using the locals option; this variable...
Twobyfour asked 15/6, 2016 at 22:6
5
Solved
I'm linking to the destroy action for the Sessions controller like this:
<%= link_to "Sign out", session_path, method: :delete %>
Routes.rb:
resources :sessions, only: [:new, :create, :de...
Thalassic asked 15/6, 2016 at 8:45
3
Solved
I'm testing the new Rails version 5.0.0.alpha and RSpec 3.1.7 but I'm receiving the error:
undefined method `use_transactional_tests=' for #<RSpec::Core::Configuration:0x007fccf515e338> (NoM...
Illustration asked 7/8, 2015 at 14:37
1
Solved
There are a bunch of tutorials floating around, but they seem to be incomplete or not fully current or don't fully work for me.
This is what I have done.
Gemfile:
gem 'rouge'
gem 'redcarpet'
T...
Sammie asked 7/6, 2016 at 0:14
3
I have been stuck on this all day. I have the very simple ActionCable example app (the chat app) by David Heinemeier Hansson working correctly (https://www.youtube.com/watch?v=n0WUjGkDFS0).
I am t...
Headwaters asked 2/2, 2016 at 5:2
1
Solved
The question has been asked in other programming languages, but how would you perform an accent insensitive regex on Ruby ?
My current code is something like
scope :by_registered_name, ->(rege...
Solitta asked 6/5, 2016 at 19:17
1
Solved
I am consistently getting an ActionView::MissingTemplate error when trying to render JSON in my Rails 5 Api. I just want to render the pure JSON, without a jbuilder or other view. Can anyone help?
...
Girlhood asked 26/4, 2016 at 16:36
3
Solved
Any attempt to run rails console in the root directory of my Rails application produces the following error:
undefined method `each' for nil:NilClass (NoMethodError)
The full stack trace:
/U...
Doughboy asked 28/1, 2016 at 1:0
1
Solved
The official documentation indicates that I should be able to build documentation for my application using rake doc:app, but when I run the command in Rails 5 I get the following output:
bwerth@bw...
Eximious asked 22/4, 2016 at 22:49
1
Solved
I'm having a migration that looks like this
class CreateQuestionings < ActiveRecord::Migration[5.0]
def change
create_table :questionings do |t|
t.text :body, null: false, limit: 260
end
e...
Lampert asked 20/4, 2016 at 21:16
1
This is my controller:
class Api::V1::UsersController < ApplicationController
respond_to :json
def show
respond_with User.find(params[:id])
end
end
This is my routes.rb
require 'api_con...
Carvalho asked 11/4, 2016 at 11:36
1
Solved
I'm going through the Rails Tutorial Book and by Chapter 8, when running bin/rails test I got this message:
DEPRECATION WARNING: `post_via_redirect` is deprecated and will be removed in Rails 5.1...
Frigorific asked 23/3, 2016 at 10:6
© 2022 - 2024 — McMap. All rights reserved.