How should I model this situation?
2
Rails
I need to store different metrics about various companies. These will be present for every company:
* revenue
* ebitda
* cash
* receivables
* employees
* debt
each one has attributes such as...
Chris Oliver replied
Texteditor
2
General
Hello! Can yoy help me? I have Ruby 2.1.3 and Rails 4.1.7. I use gem ( https://github.com/spohlenz/tinymce-rails ) and I do everything as it says, but i when paste this code: <%= tinymce %> i...
Chris Oliver replied
Devise Filter chain halted as :require_no_authentication rendered or redirected
14
Gems / Libraries
I have an app with Rails 3.2.20 and Devise 2.1.2 (Yes I know it's old) and there are random occasions where a user will trigger a URL i.e. `site.com/calls` and I will receive an error in the `produ...
shakycode replied
Passenger Spinning down in Production
5
Servers
My favorite combination of Rails/HTTP is Nginx + Passenger. They work wonderfully together and it's been super easy to setup across all of my apps. One thing I've noticed in some of my apps that ...
shakycode replied
Associating Radio Buttons With Specific Field Subsets In Rails
1
Rails
**Situation:** A user enters the name of a venue they want to add. I query an external API and get back a list of possible venues they actually meant, which they'll then confirm. The venue model wi...
Chris Oliver replied
rbenv: bundle: command not found
15
Servers
I'm trying to deploy my Rails app on my Digital Oceans VPS but I'm running into a error:
Running `cap production deploy` ends up with this error:
INFO[7cd03924] Running ~/.rbenv/bin/rbenv exec b...
shakycode replied
setup Postgres user fails
8
Databases
Hi,
I'm following the Deploy Rails guide
I'm now a the part where Postgres gets installed. I successfully installed Postgres, but when I try to create a new Postgres user with:
createuser --...
shakycode replied
could not connect to database postgres
2
Databases
I'm trying to install postgresql but I'm running into an error when I try to create a user:
createuser: could not connect to database postgres: could not connect to server: No such file or dir...
shakycode replied
Capistrano deploy removes tables from database.
3
Databases
I use capistrano to deploy my Rails app to my VPS, but after every deploy when I visit my page I get an error. The log says:
I, [2014-11-04T08:20:16.659289 #12482] INFO -- : Started GET "/" for...
shakycode replied
Show each users each post.
1
Rails
I'm trying to create a page where all my users are listed, and every movie they've added to their account.
My UserController index def
def index
@users = User.all
if logged_in?
...
Chris Oliver replied
Getting a 403 on Ubuntu + Nginx
3
Servers
My error log outputs the following,
[ 2014-11-02 04:18:12.0511 23504/7f64e6a36780 agents/Watchdog/Main.cpp:538 ]: Options: { 'analytics_log_user' => 'nobody', 'default_group' => 'nogroup', ...
Peter Boomsma replied
rbenv: 2.1.2 is not installed or not found
1
Servers
I'm trying to deploy my local Rails app to my Digital Ocean VPS using the GoRails guide > https://gorails.com/deploy/ubuntu/14.04
But I'm running into a error when I want to deploy:
cap pr...
Chris Oliver replied
Trouble With Form Objects
6
Rails
I decided to experiment with a form object.
```ruby
class Invitation
include ActiveModel::Model
attr_accessor(
:first_name,
:last_name,
:email,
:firm_id,
:role
)
vali...
Chris Zempel replied
How do I communicate if I won't hit an estimate?
2
General
Here's a situation I see come up often.
New developers (I consider myself here) will always estimate wrong. They will also feel bound to their estimates as deadlines.
What's the high value way t...
Chris Oliver replied
Environment setup: iTerm, dotfiles etc
8
General
Hi Chris
Would you be willing to share your dotfiles?
Your terminal seems so clean. Why iTerm?
Do you have git information integrated into the prompt?
What do you think of [YADR] (http://skwp.gith...
Chris Oliver replied
Pundit Scope and has_many through
1
Rails
Hi!
I can use a little help to get on the right track.
I have 3 models
```ruby
class User < ActiveRecord::Base
has_many :associations
has_many :items, through: :associations
end
class It...
Chris Oliver replied
Using Pundit to build in a cool gmail-feature
5
Rails
I'm building an app with data set up similar to this:
```ruby
class Company < ActiveRecord::Base
has_many :products
has_many :options, through: :products
end
class Product < ActiveRecor...
Chris Zempel replied
Likes routing error
8
Rails
I am trying to use the Likes tutorial to create Favs for locations, which are nested under stores.
Here is the relevant route section
```
resources :stores do
resources :locations do
r...
Chris Oliver replied
How to manually manupulate data in the production database?
6
General
Hi,
I just successfully deployed my Rails app to a Digital Ocean VPS, following the Deploy Rails guide on this website. Many thanks go to Chris Oliver and James Dullaghan for their help and patie...
shakycode replied
Ruby issue when doing cap deploy production
68
General
Hi, I'm following the Deploy Rails guide.
However, when I run
cap production deploy
I'm getting this error message:
$cap production deploy
DEBUG[be6b6bd6] Running /usr/bin/env [ -d ...
shakycode replied