nulltek
nulltek

Reputation: 3337

rails_admin not displaying view/edit controls

I have a legacy Rails app 3.2.14 using Ruby 1.9.3p194 and rails_admin 0.3.0 on a production server that is working just fine.

I'm migrating this legacy Rails app to a new server and have the app spun up and so far very few problems. One of the main issues I'm experiencing is with rails_admin. When I login as the admin user I can see all of the models/tables but when selecting table I see a list of records but no controls to edit/view each record.

enter image description here

Adding new records is not a problem and rails_admin behaves properly. But I'm unable to view or edit specific records.

It works on our production server, but when I pushed it out to this new server (which is pretty much an identical environment minus being on 64-bit Ubuntu vs 32-bit Ubuntu in production) I do not see any controls to edit records.

I'm just not sure why it works in production but has this problem when deploying to a second server.

Here's my Gemfile

source 'https://rubygems.org'

# Bundle edge Rails instead:
gem 'rails',  '~> 3.2.13'
gem 'pg', "~> 0.14.0"
gem 'thin', "~> 1.4.1"
gem 'devise', "~> 2.1.2"
gem "combined_time_select", "~> 0.0.1"
gem "will_paginate", "~> 3.0.3"
gem 'whenever', "~> 0.7.3", :require => false
gem "gritter", "1.0.2"
gem "rails_admin", "~> 0.3.0"
gem "twitter-bootstrap-rails", "~> 2.2.1"
gem "will_paginate-bootstrap", "~> 0.2.2"
gem "prawn"
gem 'twilio-ruby', '~> 3.11.6'
gem 'font-awesome-rails', '~> 4.1.0.0'

group :development do
  gem "annotate", "~> 2.5.0"
  gem "better_errors", "~> 0.3.2"
  gem "binding_of_caller"
end

gem "gmaps4rails", "~> 2.0.0.pre"
gem "taip_parser", "~> 0.0.1"
gem "foreman", "~> 0.60.0"

# Gems used only for assets and not required
# in production environments by default.
group :assets do
  gem 'sass-rails',   '~> 3.2.3'
  gem 'coffee-rails', '~> 3.2.1'
  gem 'therubyracer', '~> 0.12.1', :platforms => :ruby
 # gem 'therubyracer', '~> 0.10.2', :platforms => :ruby
  gem 'uglifier', '>= 1.0.3'
  gem 'jquery-datatables-rails'
end

gem "less-rails" #Sprockets (what Rails 3.1 uses for its asset pipeline) supports LESS
gem 'jquery-rails'

# Deploy with Capistrano
gem 'capistrano'

#Monitor app with newrelic
gem 'newrelic_rpm'

Here's my Gemfile.lock

GEM
  remote: https://rubygems.org/
  specs:
    Ascii85 (1.0.2)
    actionmailer (3.2.14)
      actionpack (= 3.2.14)
      mail (~> 2.5.4)
    actionpack (3.2.14)
      activemodel (= 3.2.14)
      activesupport (= 3.2.14)
      builder (~> 3.0.0)
      erubis (~> 2.7.0)
      journey (~> 1.0.4)
      rack (~> 1.4.5)
      rack-cache (~> 1.2)
      rack-test (~> 0.6.1)
      sprockets (~> 2.2.1)
    activemodel (3.2.14)
      activesupport (= 3.2.14)
      builder (~> 3.0.0)
    activerecord (3.2.14)
      activemodel (= 3.2.14)
      activesupport (= 3.2.14)
      arel (~> 3.0.2)
      tzinfo (~> 0.3.29)
    activeresource (3.2.14)
      activemodel (= 3.2.14)
      activesupport (= 3.2.14)
    activesupport (3.2.14)
      i18n (~> 0.6, >= 0.6.4)
      multi_json (~> 1.0)
    afm (0.2.0)
    annotate (2.5.0)
      rake
    arel (3.0.2)
    bcrypt-ruby (3.0.1)
    better_errors (0.3.2)
      coderay (>= 1.0.0)
      erubis (>= 2.7.0)
    binding_of_caller (0.7.2)
      debug_inspector (>= 0.0.1)
    bootstrap-sass (2.1.1.0)
    builder (3.0.4)
    capistrano (2.12.0)
      highline
      net-scp (>= 1.0.0)
      net-sftp (>= 2.0.0)
      net-ssh (>= 2.0.14)
      net-ssh-gateway (>= 1.1.0)
    chronic (0.6.7)
    coderay (1.1.0)
    coffee-rails (3.2.2)
      coffee-script (>= 2.2.0)
      railties (~> 3.2.0)
    coffee-script (2.2.0)
      coffee-script-source
      execjs
    coffee-script-source (1.3.3)
    combined_time_select (0.0.1)
    commonjs (0.2.6)
    daemons (1.1.8)
    debug_inspector (0.0.2)
    devise (2.1.2)
      bcrypt-ruby (~> 3.0)
      orm_adapter (~> 0.1)
      railties (~> 3.1)
      warden (~> 1.2.1)
    erubis (2.7.0)
    eventmachine (0.12.10)
    execjs (1.4.0)
      multi_json (~> 1.0)
    font-awesome-rails (4.1.0.0)
      railties (>= 3.2, < 5.0)
    font-awesome-sass-rails (2.0.0.0)
      railties (>= 3.1.1)
      sass-rails (>= 3.1.1)
    foreman (0.60.0)
      thor (>= 0.13.6)
    gmaps4rails (2.0.0.pre)
    gritter (1.0.2)
    haml (3.1.7)
    hashery (2.1.0)
    highline (1.6.13)
    hike (1.2.3)
    i18n (0.6.5)
    journey (1.0.4)
    jquery-datatables-rails (1.10.0)
      jquery-rails
    jquery-rails (2.1.4)
      railties (>= 3.0, < 5.0)
      thor (>= 0.14, < 2.0)
    jquery-ui-rails (2.0.2)
      jquery-rails
      railties (>= 3.1.0)
    json (1.8.0)
    jwt (1.0.0)
    kaminari (0.14.1)
      actionpack (>= 3.0.0)
      activesupport (>= 3.0.0)
    less (2.2.2)
      commonjs (~> 0.2.6)
    less-rails (2.2.6)
      actionpack (>= 3.1)
      less (~> 2.2.0)
    libv8 (3.16.14.3)
    mail (2.5.4)
      mime-types (~> 1.16)
      treetop (~> 1.4.8)
    mime-types (1.25)
    multi_json (1.8.0)
    nested_form (0.3.1)
    net-scp (1.0.4)
      net-ssh (>= 1.99.1)
    net-sftp (2.0.5)
      net-ssh (>= 2.0.9)
    net-ssh (2.5.2)
    net-ssh-gateway (1.1.0)
      net-ssh (>= 1.99.1)
    newrelic_rpm (3.6.5.130)
    nokogiri (1.5.6)
    orm_adapter (0.4.0)
    pdf-reader (1.3.3)
      Ascii85 (~> 1.0.0)
      afm (~> 0.2.0)
      hashery (~> 2.0)
      ruby-rc4
      ttfunk
    pg (0.14.0)
    polyglot (0.3.3)
    prawn (0.12.0)
      pdf-reader (>= 0.9.0)
      ttfunk (~> 1.0.2)
    rack (1.4.5)
    rack-cache (1.2)
      rack (>= 0.4)
    rack-pjax (0.6.0)
      nokogiri (~> 1.5)
      rack (~> 1.3)
    rack-ssl (1.3.3)
      rack
    rack-test (0.6.2)
      rack (>= 1.0)
    rails (3.2.14)
      actionmailer (= 3.2.14)
      actionpack (= 3.2.14)
      activerecord (= 3.2.14)
      activeresource (= 3.2.14)
      activesupport (= 3.2.14)
      bundler (~> 1.0)
      railties (= 3.2.14)
    rails_admin (0.3.0)
      bootstrap-sass (~> 2.1)
      builder (~> 3.0)
      coffee-rails (~> 3.1)
      font-awesome-sass-rails (~> 2.0)
      haml (~> 3.1)
      jquery-rails (~> 2.1)
      jquery-ui-rails (~> 2.0)
      kaminari (~> 0.14)
      nested_form (> 0.2.3, < 0.4.0)
      rack-pjax (~> 0.6)
      rails (~> 3.1)
      remotipart (~> 1.0)
      sass-rails (~> 3.1)
    railties (3.2.14)
      actionpack (= 3.2.14)
      activesupport (= 3.2.14)
      rack-ssl (~> 1.3.2)
      rake (>= 0.8.7)
      rdoc (~> 3.4)
      thor (>= 0.14.6, < 2.0)
    rake (10.1.0)
    rdoc (3.12.2)
      json (~> 1.4)
    ref (1.0.5)
    remotipart (1.0.2)
    ruby-rc4 (0.1.5)
    sass (3.1.20)
    sass-rails (3.2.5)
      railties (~> 3.2.0)
      sass (>= 3.1.10)
      tilt (~> 1.3)
    sprockets (2.2.2)
      hike (~> 1.2)
      multi_json (~> 1.0)
      rack (~> 1.0)
      tilt (~> 1.1, != 1.3.0)
    taip_parser (0.0.1)
    therubyracer (0.12.1)
      libv8 (~> 3.16.14.0)
      ref
    thin (1.4.1)
      daemons (>= 1.0.9)
      eventmachine (>= 0.12.6)
      rack (>= 1.0.0)
    thor (0.18.1)
    tilt (1.4.1)
    treetop (1.4.15)
      polyglot
      polyglot (>= 0.3.1)
    ttfunk (1.0.3)
    twilio-ruby (3.11.6)
      builder (>= 2.1.2)
      jwt (>= 0.1.2)
      multi_json (>= 1.3.0)
    twitter-bootstrap-rails (2.2.1)
      actionpack (>= 3.1)
      execjs
      railties (>= 3.1)
    tzinfo (0.3.37)
    uglifier (1.2.6)
      execjs (>= 0.3.0)
      multi_json (~> 1.3)
    warden (1.2.1)
      rack (>= 1.0)
    whenever (0.7.3)
      activesupport (>= 2.3.4)
      chronic (~> 0.6.3)
    will_paginate (3.0.3)
    will_paginate-bootstrap (0.2.2)
      will_paginate (>= 3.0.3)

PLATFORMS
  ruby

DEPENDENCIES
  annotate (~> 2.5.0)
  better_errors (~> 0.3.2)
  binding_of_caller
  capistrano
  coffee-rails (~> 3.2.1)
  combined_time_select (~> 0.0.1)
  devise (~> 2.1.2)
  font-awesome-rails (~> 4.1.0.0)
  foreman (~> 0.60.0)
  gmaps4rails (~> 2.0.0.pre)
  gritter (= 1.0.2)
  jquery-datatables-rails
  jquery-rails
  less-rails
  newrelic_rpm
  pg (~> 0.14.0)
  prawn
  rails (~> 3.2.13)
  rails_admin (~> 0.3.0)
  sass-rails (~> 3.2.3)
  taip_parser (~> 0.0.1)
  therubyracer (~> 0.12.1)
  thin (~> 1.4.1)
  twilio-ruby (~> 3.11.6)
  twitter-bootstrap-rails (~> 2.2.1)
  uglifier (>= 1.0.3)
  whenever (~> 0.7.3)
  will_paginate (~> 3.0.3)
  will_paginate-bootstrap (~> 0.2.2)

Upvotes: 0

Views: 1142

Answers (1)

RAJ
RAJ

Reputation: 9747

You need to remove gem 'font-awesome-rails', '~> 4.1.0.0' from your gemfile and run bundle install.

Actually rails_admin uses Bootstrap 2 with FontAwesome 3. However you are installing FontAwesome 4 from your gemfile. It is causing conflict in gem version. RailsAdmin uses the old-style syntax (e.g. 'icon icon-pencil') instead of the new-style (e.g. 'fa fa-pencil'). Because of this, the icons were not showing up.

It you can live without FontAwesome 4, just remove it.

Jeff also had same problem as you have.

Upvotes: 1

Related Questions