I
I
Ivan Nesterovich2013-12-16 12:54:28
Ruby on Rails
Ivan Nesterovich, 2013-12-16 12:54:28

Is ruby ​​on rails carrier a reserved word?

I created the Carrier model, but I can't make a selection based on the database - it gives an error undefined method `all` and so on.
Carrier.class returns Module
The rest of the models return Class
I didn't find it in the list of reserved words. How to be? What's wrong?
The most interesting thing is that if you rename the model to Ucarrier, then everything is fine.
Model:

class Carrier < ActiveRecord::Base
  belongs_to :user
end

gemfile:
source 'https://rubygems.org'

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.0.1'
gem 'russian', '~> 0.6.0'

gem 'mysql2'

# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.0'

# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'

# Use CoffeeScript for .js.coffee assets and views
gem 'coffee-rails', '~> 4.0.0'

# See https://github.com/sstephenson/execjs#readme for more supported runtimes
 gem 'therubyracer', platforms: :ruby
 gem "less-rails"

# Use jquery as the JavaScript library
gem 'jquery-rails'

# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'

# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 1.2'

group :doc do
  # bundle exec rake doc:rails generates the API under doc/api.
  gem 'sdoc', require: false
end

gem 'activeadmin', github: 'gregbell/active_admin'
gem "just-datetime-picker"

gem "slim-rails"
gem 'awesome_nested_set', "~> 3.0.0.rc.2"
gem "the_sortable_tree", "~> 2.3.0"
gem "devise"
gem "cancan"
gem 'quiet_assets', :group => :development
gem 'jquery-ui-rails'
gem "paperclip", "~> 3.5.2"
gem "nested_form"
gem "acts_as_list"
gem "better_errors"
gem 'seed_dump'
gem "rails_config"

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander Alexandrov, 2014-08-25
@hazg

echo "gem 'pry-rails'" >> Gemfile
bundle
rails console
> show-source Carrier

P
Piranis, 2014-03-22
@Piranis

a quick search found the following gem rubygems.org/gems/carrier

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question