0

So I just finished setting up a new test deploy server and am using a test ruby app to test it out. Everything got deployed correctly using capistrano. But nothing shows up on the webpage ip. And like the tutorial I was following said, I needed to set up a root for the server to go to. To do this, I need to generate a scaffold with users. So I did the following and got an error:

    MacBook-Pro:deploy_test $ rails g scaffold User
/usr/local/lib/ruby/gems/2.2.0/gems/nokogiri-1.6.7.1/lib/nokogiri.rb:29:in `require': dlopen(/usr/local/lib/ruby/gems/2.2.0/gems/nokogiri-1.6.7.1/lib/nokogiri/nokogiri.bundle, 9): Library not loaded: /usr/local/lib/libruby.2.2.0.dylib (LoadError)
  Referenced from: /usr/local/lib/ruby/gems/2.2.0/gems/nokogiri-1.6.7.1/lib/nokogiri/nokogiri.bundle
  Reason: image not found - /usr/local/lib/ruby/gems/2.2.0/gems/nokogiri-1.6.7.1/lib/nokogiri/nokogiri.bundle
    from /usr/local/lib/ruby/gems/2.2.0/gems/nokogiri-1.6.7.1/lib/nokogiri.rb:29:in `rescue in <top (required)>'
    from /usr/local/lib/ruby/gems/2.2.0/gems/nokogiri-1.6.7.1/lib/nokogiri.rb:25:in `<top (required)>'
    from /usr/local/lib/ruby/gems/2.2.0/gems/loofah-2.0.3/lib/loofah.rb:3:in `require'
    from /usr/local/lib/ruby/gems/2.2.0/gems/loofah-2.0.3/lib/loofah.rb:3:in `<top (required)>'
    from /usr/local/lib/ruby/gems/2.2.0/gems/rails-html-sanitizer-1.0.2/lib/rails-html-sanitizer.rb:2:in `require'
    from /usr/local/lib/ruby/gems/2.2.0/gems/rails-html-sanitizer-1.0.2/lib/rails-html-sanitizer.rb:2:in `<top (required)>'
    from /usr/local/lib/ruby/gems/2.2.0/gems/actionview-4.2.5/lib/action_view/helpers/sanitize_helper.rb:3:in `require'
    from /usr/local/lib/ruby/gems/2.2.0/gems/actionview-4.2.5/lib/action_view/helpers/sanitize_helper.rb:3:in `<top (required)>'
    from /usr/local/lib/ruby/gems/2.2.0/gems/actionview-4.2.5/lib/action_view/helpers/text_helper.rb:32:in `<module:TextHelper>'
    from /usr/local/lib/ruby/gems/2.2.0/gems/actionview-4.2.5/lib/action_view/helpers/text_helper.rb:29:in `<module:Helpers>'
    from /usr/local/lib/ruby/gems/2.2.0/gems/actionview-4.2.5/lib/action_view/helpers/text_helper.rb:6:in `<module:ActionView>'
    from /usr/local/lib/ruby/gems/2.2.0/gems/actionview-4.2.5/lib/action_view/helpers/text_helper.rb:4:in `<top (required)>'
    from /usr/local/lib/ruby/gems/2.2.0/gems/actionview-4.2.5/lib/action_view/helpers/form_tag_helper.rb:18:in `<module:FormTagHelper>'
    from /usr/local/lib/ruby/gems/2.2.0/gems/actionview-4.2.5/lib/action_view/helpers/form_tag_helper.rb:14:in `<module:Helpers>'
    from /usr/local/lib/ruby/gems/2.2.0/gems/actionview-4.2.5/lib/action_view/helpers/form_tag_helper.rb:8:in `<module:ActionView>'
    from /usr/local/lib/ruby/gems/2.2.0/gems/actionview-4.2.5/lib/action_view/helpers/form_tag_helper.rb:6:in `<top (required)>'
    from /usr/local/lib/ruby/gems/2.2.0/gems/actionview-4.2.5/lib/action_view/helpers/form_helper.rb:4:in `require'
    from /usr/local/lib/ruby/gems/2.2.0/gems/actionview-4.2.5/lib/action_view/helpers/form_helper.rb:4:in `<top (required)>'
    from /usr/local/lib/ruby/gems/2.2.0/gems/actionview-4.2.5/lib/action_view/helpers.rb:50:in `<module:Helpers>'
    from /usr/local/lib/ruby/gems/2.2.0/gems/actionview-4.2.5/lib/action_view/helpers.rb:4:in `<module:ActionView>'
    from /usr/local/lib/ruby/gems/2.2.0/gems/actionview-4.2.5/lib/action_view/helpers.rb:3:in `<top (required)>'
    from /usr/local/lib/ruby/gems/2.2.0/gems/sprockets-rails-3.0.0/lib/sprockets/rails/context.rb:7:in `<module:Context>'
    from /usr/local/lib/ruby/gems/2.2.0/gems/sprockets-rails-3.0.0/lib/sprockets/rails/context.rb:6:in `<module:Rails>'
    from /usr/local/lib/ruby/gems/2.2.0/gems/sprockets-rails-3.0.0/lib/sprockets/rails/context.rb:5:in `<module:Sprockets>'
    from /usr/local/lib/ruby/gems/2.2.0/gems/sprockets-rails-3.0.0/lib/sprockets/rails/context.rb:4:in `<top (required)>'
    from /usr/local/lib/ruby/gems/2.2.0/gems/sprockets-rails-3.0.0/lib/sprockets/railtie.rb:7:in `require'
    from /usr/local/lib/ruby/gems/2.2.0/gems/sprockets-rails-3.0.0/lib/sprockets/railtie.rb:7:in `<top (required)>'
    from /usr/local/lib/ruby/gems/2.2.0/gems/sass-rails-5.0.4/lib/sass/rails/railtie.rb:3:in `require'
    from /usr/local/lib/ruby/gems/2.2.0/gems/sass-rails-5.0.4/lib/sass/rails/railtie.rb:3:in `<top (required)>'
    from /usr/local/lib/ruby/gems/2.2.0/gems/sass-rails-5.0.4/lib/sass/rails.rb:11:in `require'
    from /usr/local/lib/ruby/gems/2.2.0/gems/sass-rails-5.0.4/lib/sass/rails.rb:11:in `<top (required)>'
    from /usr/local/lib/ruby/gems/2.2.0/gems/sass-rails-5.0.4/lib/sass-rails.rb:1:in `require'
    from /usr/local/lib/ruby/gems/2.2.0/gems/sass-rails-5.0.4/lib/sass-rails.rb:1:in `<top (required)>'
    from /usr/local/lib/ruby/gems/2.2.0/gems/font-awesome-sass-4.5.0/lib/font-awesome-sass.rb:66:in `require'
    from /usr/local/lib/ruby/gems/2.2.0/gems/font-awesome-sass-4.5.0/lib/font-awesome-sass.rb:66:in `register_rails_engine'
    from /usr/local/lib/ruby/gems/2.2.0/gems/font-awesome-sass-4.5.0/lib/font-awesome-sass.rb:8:in `load!'
    from /usr/local/lib/ruby/gems/2.2.0/gems/font-awesome-sass-4.5.0/lib/font-awesome-sass.rb:79:in `<top (required)>'
    from /usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler/runtime.rb:76:in `require'
    from /usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
    from /usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler/runtime.rb:72:in `each'
    from /usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler/runtime.rb:72:in `block in require'
    from /usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler/runtime.rb:61:in `each'
    from /usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler/runtime.rb:61:in `require'
    from /usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler.rb:134:in `require'
    from /Users/username/Desktop/site/deploy_test/config/application.rb:7:in `<top (required)>'
    from /usr/local/lib/ruby/gems/2.2.0/gems/railties-4.2.5/lib/rails/commands/commands_tasks.rb:141:in `require'
    from /usr/local/lib/ruby/gems/2.2.0/gems/railties-4.2.5/lib/rails/commands/commands_tasks.rb:141:in `require_application_and_environment!'
    from /usr/local/lib/ruby/gems/2.2.0/gems/railties-4.2.5/lib/rails/commands/commands_tasks.rb:128:in `generate_or_destroy'
    from /usr/local/lib/ruby/gems/2.2.0/gems/railties-4.2.5/lib/rails/commands/commands_tasks.rb:50:in `generate'
    from /usr/local/lib/ruby/gems/2.2.0/gems/railties-4.2.5/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
    from /usr/local/lib/ruby/gems/2.2.0/gems/railties-4.2.5/lib/rails/commands.rb:17:in `<top (required)>'
    from bin/rails:4:in `require'

Here's what my Gemfile looks like:

source 'https://rubygems.org'

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.2.5'

# Use Bootstrap
gem 'bootstrap-sass', '~> 3.3.5'
# Use Font-Awesome
gem 'font-awesome-sass'
# Use SCSS for stylesheets
gem 'sass-rails', '>= 3.2'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.1.0'
# Use jquery as the JavaScript library
gem 'jquery-rails'
gem 'jquery-ui-rails'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.0'
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', '~> 0.4.0', group: :doc

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

#gem 'pygments.rb', '~> 0.6.0'
gem 'redcarpet', '~> 3.2.2'

gem 'passenger'


group :production do 
    gem 'pg'
end

group :development, :test do
  # Call 'byebug' anywhere in the code to stop execution and get a debugger console
  gem 'byebug'
end

group :development do

    gem 'sqlite3'

    # Use Capistrano for deployment
    gem 'capistrano-bundler', '~> 1.1', '>= 1.1.4'
    gem 'capistrano', '~> 3.4.0'
    gem 'capistrano-rails', '~> 1.1', '>= 1.1.5'
    gem 'capistrano-rbenv', '~> 2.0', '>= 2.0.4'

  # Access an IRB console on exception pages or by using <%= console %> in views
  gem 'web-console', '~> 2.0'

  # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
  gem 'spring'
end

No idea what this means?

Corey
  • 835
  • 1
  • 9
  • 32
  • have you tried adding ``gem 'nokogiri'`` in your gemfile? – apebeast Jan 14 '16 at 00:40
  • I did, still had the same problem. But it wouldn't make sense for the app to require that with just a standard app? – Corey Jan 14 '16 at 00:47
  • Make sure you updated your Gemfile.lock after adding nokogiri by running bundler before pushing to the prodution server again. – errata Jan 14 '16 at 01:49
  • Updated the Gemfile.lock, and then added it to git and deployed. Which now gives me another error and won't deploy: Could not find rake-10.5.0 in any of the sources Run `bundle install` to install missing gems. So I ran bundle install and as well as gem install rake. Neither have fixed the issues... – Corey Jan 14 '16 at 13:02

0 Answers0