Use the activeadmin into the gem file. bundle install, rails g active_admin:install User, then rails s, the server will crash and give some warning.
Error Information:
rails s
WARNING: Nokogiri was built against LibXML version 2.9.4, but has dynamically loaded 2.8.0
=> Booting WEBrick
=> Rails 5.0.0 application starting in development on http://localhost:3000
=> Run `rails server -h` for more startup options
DEPRECATION WARNING: You are using the a deprecated processor interface #<Proc:0x0055902480b218#/home/guo/.rvm/gems/ruby-2.3.1/gems/autoprefixer-rails-5.2.1.3/lib/autoprefixer-rails/sprockets.rb:25>.
Please update your processor interface:
https://github.com/rails/sprockets/blob/master/guides/extending_sprockets.md#supporting-all-versions-of-sprockets-in-processors
(called from install at /home/guo/.rvm/gems/ruby-2.3.1/gems/autoprefixer-rails-5.2.1.3/lib/autoprefixer-rails/sprockets.rb:25)
Exiting
Here is my gem list.
source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '5.0.0'
# Use postgresql as the database for Active Record
gem 'pg', '~> 0.15'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
# 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'
# See https://github.com/rails/execjs#readme for more supported runtimes
gem 'therubyracer', platforms: :ruby
# 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', '~> 2.0'
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', '~> 0.4.0', group: :doc
gem 'activeadmin'
gem 'devise'
gem 'cancancan'
gem 'rolify'
gem 'draper'
gem 'pundit'
# Use ActiveModel has_secure_password
gem 'bcrypt', '~> 3.1.7'
gem 'bootstrap-sass', '~>3.3.7'
gem 'autoprefixer-rails', '~>5.2.1'
#gem "twitter-bootstrap-rails"
gem 'carrierwave', '>= 1.0.0.beta', '< 2.0' gem 'rmagick'
gem 'grape'
gem 'doorkeeper'
gem "rack-oauth2"
#gem 'will_paginate', '~> 3.1.1' gem 'kaminari'
gem 'dalli' gem 'actionpack-page_caching' gem 'actionpack-action_caching'
gem 'delayed_job' gem 'delayed_job_active_record' #gem "sidekiq"
#gem "devise-doorkeeper"
gem 'roadie'
gem 'roadie-rails'
gem 'nokogiri', '1.6.0'
#gem 'premailer-rails'
If you are using rails 5, try this:
gem 'inherited_resources', git: 'https://github.com/activeadmin/inherited_resources'
gem 'activeadmin', git: 'https://github.com/activeadmin/activeadmin'
And also kill the existing server ,As suggested by #ray, and start the server. You can check the existing server
ps aux|grep puma
It prints all the puma processes like this
pragya_+ 1378 0.2 1.6 1233236 140252 tty4 Sl 10:15 0:24 puma 3.12.1 (tcp://localhost:3000)
Here 1378 is the process_id. Now kill that process by run this command:
kill -9 1378
Restart the server and check again. Hope it will work :)
Related
My machine is a Windows 8 32 bit machine and I have ruby 2.1.8.
I am facing a problem when I am trying to open my app in puma and rails server. I am even unable to run bundle install. The erorr is:
in `require': 126: The specified module could not be found.
- C:/Ruby21/lib/ruby/gems/2.1.0/gems/bcrypt-ruby-3.1.1.rc1-x86-mingw32/lib/bcrypt_ext.so (LoadError)
and the bundle install error is:
could not find gem 'bcrypt (=3.1.5 rc1) x64-mingw32' in any of the gemfile ruby 2.1.8
same problem happens also for bcrypt version 3.0.0 and 3.1.1 also
My Gemfile is:
source 'http://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.1.9'
# Use sqlite3 as the database for Active Record
gem 'pg'
gem 'plivo'
# 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'
gem 'coffee-script-source', '1.8.0'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
# Use jquery as the JavaScript library gem 'jquery-rails'
gem 'rails-jquery-autocomplete', :git 'https://github.com/AyushRuiaHW/rails-jquery-autocomplete.git'
# 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 'tzinfo-data'
gem 'faraday'
gem 'hypdf', '~> 1.0.12'
gem 'currency-in-words'
gem "jquery-ui-rails"
gem 'Instamojo-rb'
gem "kaminari"
gem "rails-erd"
gem 'levenshtein', '~> 0.2.2'
gem "lol_dba"
gem "bullet", :group => "development"
gem "bootstrap-sass"
gem 'rack-mini-profiler'
gem 'newrelic_rpm'
gem 'puma_worker_killer'
# Use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'
# Use unicorn as the app server
# gem 'unicorn'
# Use Capistrano for deployment
# gem 'capistrano', group: :development
# Use debugger
# gem 'debugger', group: [:development, :test]
gem 'postmark-rails'
gem 'bcrypt-ruby', '3.1.5.rc1', :require => 'bcrypt'
gem 'puma'
gem "paperclip", "~> 3.0"
gem 'aws-sdk', '~> 1'
gem 'aws-sdk-resources', '~> 2'
gem 'rails_12factor', group: :production
ruby "2.1.8"
delete your old gem 'bcrypt-ruby',and insert
gem 'bcrypt', '~> 3.1', '>= 3.1.11'
and run
bundle install
You need to remove your old gem and update your gemfile with following
gem 'bcrypt-ruby', '~> 3.1.0'
and run bundle install , then restart your server.
You might also want to try deleting your gemfile.lock and re-running bundle install.
OR
you can install gem bcrypt directly from command line as following :
gem install --version='3.1.0' bcrypt-ruby
then run bundle install
I am new to Ruby on Rails(4.1.8) and using OS Windows 8, I have added the gem activeadmin in my gemfile and ran commands
rails g active_admin:install --skip-users
rake db:migrate
rails server
but I get the following exception while running http://localhost:3000/admin
TypeError: Object doesn't support this property or method (in
c:/Sites/CleverChalk/app/assets/javascripts/active_admin.js.coffee)
Could someone please advise why this occurs. i read a couple of post on
coffee-script-source and
coffee-rails but they have not worked for me.
My Gemfile is as below :
source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.1.8'
# Use sqlite3 as the database for Active Record
#gem 'sqlite3'
gem 'pg'
gem 'activeadmin', github: 'activeadmin'
gem 'coffee-script-source', '1.8.0'
gem 'coffee-rails', '~> 4.0.0'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.3'
# 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
# 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', '~> 2.0'
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', '~> 0.4.0', group: :doc
# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'
# Use unicorn as the app server
# gem 'unicorn'
# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development
# Use debugger
# gem 'debugger', group: [:development, :test]
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin]
I could resolve the issue by reinstalling activeadmin with Users that meant adding the devise gem as shown below:
gem 'devise'
to the gemfile and then
bundle install
rails generate devise:install
Thanks.
Okay, so I've got an error while building my Docker image (think of it as similar to a deploy step, or Heroku deploy if you're unfamiliar with Docker).
Gems that are in the :test and :development groups are being looked for when the precompile step happens, and since I've bundled --without development test - as I don't want to have QT just so that capybara-webkit doesn't error on bundle - the precompile step is throwing an error.
The error is always a variant of:
Could not find <gem-name> in any of the sources (Bundler::GemNotFound)
My Gemfile:
source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.1.9'
# Use sqlite3 as the database for Active Record
# gem 'sqlite3'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
# 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'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
# 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', '~> 2.0'
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', '~> 0.4.0', group: :doc
# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'
# Use Unicorn as the app server
# gem 'unicorn'
gem 'unicorn', '~> 4.8.3'
gem 'unicorn-worker-killer', '~> 0.4.2'
# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development
gem 'rdf', '~> 1.1.0'
gem 'tripod', '~> 0.11.1'
gem 'devise'
gem 'devise_invitable'
gem 'authority'
gem 'mongoid', '~> 4.0.0'
gem 'bootstrap-sass', '~> 3.3.3'
# pagination
gem 'kaminari', '~> 0.16.3'
gem 'bootstrap-kaminari-views'
# background processing
gem 'sidekiq'
gem 'sidekiq-status'
gem 'request_store', '~> 1.1.0'
# add memoization
gem 'memoist', '~> 0.12.0'
# dropbox gem for uploads etc
gem 'dropbox-sdk', '~> 1.6.4'
# error reporting
gem 'sentry-raven'
group :development, :test do
gem "rspec-rails", "~> 3.0.0"
gem "factory_girl_rails", "~> 4.5.0"
gem "capybara", "~> 2.4"
gem "database_cleaner"
# gem "selenium-webdriver"
gem 'poltergeist'
gem 'capybara-webkit'
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
#gem 'byebug'
gem 'pry-byebug'
gem 'better_errors', '~> 2.1.1'
# 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
The line in the Dockerfile where the error happens is:
RUN /bin/bash -l -c "RAILS_ENV=production bundle exec rake assets:precompile RAILS_GROUPS=assets --trace"
So basically, what I'm really after is the equivalent for --without test development for the rake task. Can I do that? As per some advice, I've already changed (in application.rb):
Bundler.require(*Rails.groups)
to
Bundler.require(:default, :assets, Rails.env)
Anybody have Rails-fu enough to solve this one? I've looked in the docs and on SO, as well as asking my colleagues but I'm still banging my head against the wall over this.
bundle install --path vendor/cache
Try this and let me know if it doesn't work!
I'm using rails 4.1.4 and ruby-2.1.1. My Gemfile :
source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.1.4'
# Use mysql as the database for Active Record
gem 'mysql2'
gem 'devise'
gem "paperclip", "~> 4.2"
gem 'aws-sdk'
gem 'bootstrap-sass-rails'
gem 'bootstrap-datepicker-rails'
gem 'jquery-tokeninput-rails'
gem 'carmen-rails'
gem 'will_paginate'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.3'
# 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
# Use jquery as the JavaScript library
gem 'jquery-rails'
gem 'jquery-ui-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', '~> 2.0'
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', '~> 0.4.0', group: :doc
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring', group: :development
# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'
# Use unicorn as the app server
# gem 'unicorn'
# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development
# Use debugger
gem 'byebug'
# gem 'debugger', group: [:development, :test]
# group :production do
# gem "rails_12factor"
# gem "activerecord-postgresql-adapter"
# gem 'pg'
# end
gem 'activemerchant'
but whenever i run the bundle install command Rubymine said,
Gemfile:29: syntax error, unexpected ':', expecting $end
gem 'therubyracer', platforms: :ruby
what should i do? If i commented out the "therubyracer" gem. Then this error shows for sdoc gem.
Try this:
gem 'therubyracer', :platform => :ruby
As I see from your error traceback, you have Ruby 1.8 installed (OS default). Ruby on Rails 4.1 requires at least Ruby 1.9.3. So you can use RVM to install newer Ruby version. Then you'll be able to install all required gems. And using RVM or rbenv is recommended way to manage rubies nowadays.
ran bundle install
Unfortunately, a fatal error has occurred. Please see the Bundler troubleshooting documentation at http://bit.ly/bundler-issues. Thanks!
/Users/judyngai/.rvm/rubies/ruby-2.0.0-p195/lib/ruby/site_ruby/2.0.0/rubygems/requirement.rb:90:in `parse': Illformed requirement [""] (Gem::Requirement::BadRequirementError)
what is the problem with my bundler?
is working in a blank app but just not at the app that I am working on.
thank you
here is my gemfile as requested
source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.0.0'
#High Voltage
gem "high_voltage", "~> 1.2.4"
#Database
gem "pg", "~> 0.16.0"
#to make attribute accessible work
gem "protected_attributes", "~> 1.0.3"
#Authentication , upgrading devise?
gem "devise", "~> 3.0.3"
#Active Admin
gem 'activeadmin', github: 'gregbell/active_admin', branch: 'rails4'
#Simple Form
gem 'simple_form'
#js runting for bootstrap to work
gem "therubyracer"
#Web Server
gem "thin"
#Student Picture Uploaders
gem "rmagick"
gem "carrierwave"
# 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
# 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
# Use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'
# Use unicorn as the app server
# gem 'unicorn'
# Use Capistrano for deployment
# gem 'capistrano', group: :development
# Use debugger
# gem 'debugger', group: [:development, :test]
I don't see any syntax errors in my gemfile. I remember seeing the same error before and removed an extra comma from my gemfile.