ruby-on-rails Questions
25
I've been experimenting with EC2 for a couple days and have been banging my head against simply even being able to access the sample site I've hosted. The stack is Rails 3.1.3 with Thin and Nginx. ...
Phenformin asked 20/4, 2012 at 21:0
2
Solved
How to reply a simple ruby rack server with JSON object , lets assume mt server is something like :
app = Proc.new do |env|
[200, { 'Content-Type' => 'text/plain' }, ['Some body']]
end
Rac...
Mochun asked 11/3, 2012 at 22:28
10
Solved
I have an app setup where each user belongs to a company, and that company has a subdomain (I am using basecamp style subdomains). The problem that I am facing is that rails is creating multiple co...
Hornstone asked 1/5, 2012 at 19:2
16
Solved
I'm investigating a rails app - the prod server has two version of a specific gem installed, how can I tell which version the prod app is using?
Patterman asked 25/10, 2009 at 17:0
3
Solved
I need to check on a Boolean variable whether its value has been set or not, I would know that by checking if it contains an empty string "" or nil indicates the value has not been set an...
Contribute asked 7/9, 2018 at 1:18
5
Apparently there is no assert_false in Test::Unit. How would you add it by extending assertions and adding the file config/initializers/assertions_helper.rb?
Is this the best way to do it? I don'...
Bartizan asked 24/11, 2011 at 17:33
17
Solved
I have a string: "31-02-2010" and want to check whether or not it is a valid date.
What is the best way to do it?
I need a method which which returns true if the string is a valid date and false i...
Industrious asked 2/6, 2010 at 7:46
7
I'm trying to set up my rails project with tailwind, but none of the actual tailwind changes are showing up in the browser. In devtools the class is displayed, but it doesn't make any change in the...
Nguyen asked 12/1, 2022 at 16:54
4
Solved
I have a Rails 7 project using TailwindCSS deployed to Heroku that is not building tailwind.css during rake asset:precompile and I don't know why. When I try to access the application, it crashes w...
Uno asked 19/3, 2022 at 12:41
4
Solved
rails guide example, click the button save post, console show this message:
Started POST "/posts" for 127001 at 2013-12-25 22:42:04 +0800
Processing by PostsController#create as HTML Parameters...
Bohannon asked 25/12, 2013 at 15:14
3
I have defined after_commit callback on update. It doesn't trigger in rspec.
Here is my callback :
after_commit :notify_trip, :if => Proc.new { |trip| trip.can_send_schedule_notification? }, o...
Suntan asked 26/11, 2015 at 13:44
13
Solved
Help me please, I've finished 11 chapters of the rails tutorial, deployed my app to heroku (locally it worked perfectly) and it crashing all time. I'm using rails 5.2.2
After execution of command $...
Trin asked 20/1, 2019 at 14:21
6
I am new to rails and I am trying to render a partial within a loop as such.
Here , books is an array eager loaded in controller.
books.each do |book|
<%= render 'books/book', :book => bo...
Gist asked 15/2, 2015 at 8:38
4
Solved
I'm starting a new app and notice some missing documentation from the last time I built a MongoID app from scratch. Namely they used to suggest on a page that no longer exists (http://mongoid.org/d...
Burchfield asked 28/4, 2011 at 22:13
2
Solved
I need to format an integer representation of bytes into something friendly, and I'm hoping that there's a utility function in Ruby or in Rails that will do that formatting for me (to perpetuate my...
Gadoid asked 8/12, 2008 at 16:5
3
Solved
I have a script that runs for a few minutes as a job on the cluster in the production environment. There are between 0 and 100 such jobs, each with 1 script per job, running at the same time on the...
Janejanean asked 10/4 at 17:24
4
Solved
Getting a strange error on bundle install..
bundle install
Fetching gem metadata from http://rubygems.org/.....
Fetching gem metadata from http://rubygems.org/..
Fetching git://github.com/maccman/...
Lory asked 30/3, 2012 at 8:46
2
Solved
Using Ubuntu, when I run "bundle install" to set up my Rails environment, it throws an error during the JSON gem installation:
Installing json (1.7.3) with native extensions
Gem::Installer::Exten...
Larcher asked 15/6, 2012 at 22:31
6
Solved
we've just upgraded to Rails 3.2.5 from Rails 3.0.7 and using the assets-pipeline compilation on the fly for the staging server, but some times we face this exception !
Showing /var/rails/appname/...
Fanjet asked 13/6, 2012 at 11:19
11
how can I get the subdomain value in rails, is there a built-in way to do this?
e.g.
test123.example.com
I want the test123 part of the url.
Pyretic asked 30/11, 2010 at 4:31
4
Solved
I need to force SSL on all routes in my application except for message#new controller.
In config/environments/production.rb, I have:
config.force_ssl = true
Now all routes being redirect to htt...
Penton asked 15/7, 2015 at 5:13
6
Background info:
I'm using GIT to get a repository of a project with Ruby files in it. The project lives in my SITES folder under home directory on my Mac.
I have Ruby: 1.8.7
I have just upgrade...
Discretional asked 9/1, 2011 at 2:21
3
I don't know why I can not use rack-attack gem
Here what I did
Gemfile
gem 'rack-attack'
I ve installed the gem
config/application.rb
config.middleware.use Rack::Attack
initializers/rack-a...
Jemmie asked 18/11, 2015 at 11:27
7
Earlier my files were uploading in the storage folder. But now I want to upload images on the s3 bucket. how can I migrate my existing local data on the s3 bucket?
I found the script here https://...
Cathedral asked 24/6, 2019 at 11:45
8
Solved
I`m in root of my application, and when I type
$ rails console
It looks like something is loading, but nothing happens.
And when I stop ^C I received this trace:
^C/home/jonatas/.rvm/gems/ruby...
Wolgast asked 18/6, 2014 at 2:8
© 2022 - 2024 — McMap. All rights reserved.