"uninitialized constant Sass::Script (NameError)" - ruby-on-rails

I had first to change my Gemfile from (I deleted the comments to make the text shorter):
source 'https://rubygems.org'
gem 'rails', '4.2.0'
gem 'sqlite3'
gem 'sass-rails', '~> 5.0'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.1.0'
gem 'jquery-rails'
gem 'turbolinks'
gem 'jbuilder', '~> 2.0'
gem 'sdoc', '~> 0.4.0', group: :doc
group :development, :test do
gem 'byebug'
gem 'web-console', '~> 2.0'
gem 'spring'
end
to:
source 'https://rubygems.org'
gem 'rails', '4.2.0'
gem 'sass-rails', '5.0.1'
gem 'uglifier', '2.5.3'
gem 'coffee-rails', '4.1.0'
gem 'jquery-rails', '4.0.3'
gem 'turbolinks', '2.3.0'
gem 'jbuilder', '2.2.3'
gem 'sdoc', '0.4.0', group: :doc
group :development, :test do
gem 'sqlite3', '1.3.9'
gem 'byebug', '3.4.0'
gem 'web-console', '2.0.0.beta3'
gem 'spring', '1.1.3'
end
now when I try to run the rails server with rails server -b $IP -p $PORT I get following error message:
/usr/local/rvm/gems/ruby-2.1.5#rails4/gems/sass-rails-5.0.1/lib/sass/rails/helpers.rb:11:in `<top (required)>': uninitialized constant Sass::Script (NameError)
from /usr/local/rvm/gems/ruby-2.1.5#rails4/gems/sass-rails-5.0.1/lib/sass/rails.rb:8:in `require'
from /usr/local/rvm/gems/ruby-2.1.5#rails4/gems/sass-rails-5.0.1/lib/sass/rails.rb:8:in `<top (required)>'
from /usr/local/rvm/gems/ruby-2.1.5#rails4/gems/sass-rails-5.0.1/lib/sass-rails.rb:1:in `require'
from /usr/local/rvm/gems/ruby-2.1.5#rails4/gems/sass-rails-5.0.1/lib/sass-rails.rb:1:in `<top (required)>'
from /usr/local/rvm/gems/ruby-2.1.5#global/gems/bundler-1.7.6/lib/bundler/runtime.rb:76:in `require'
from /usr/local/rvm/gems/ruby-2.1.5#global/gems/bundler-1.7.6/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
from /usr/local/rvm/gems/ruby-2.1.5#global/gems/bundler-1.7.6/lib/bundler/runtime.rb:72:in `each'
from /usr/local/rvm/gems/ruby-2.1.5#global/gems/bundler-1.7.6/lib/bundler/runtime.rb:72:in `block in require'
from /usr/local/rvm/gems/ruby-2.1.5#global/gems/bundler-1.7.6/lib/bundler/runtime.rb:61:in `each'
from /usr/local/rvm/gems/ruby-2.1.5#global/gems/bundler-1.7.6/lib/bundler/runtime.rb:61:in `require'
from /usr/local/rvm/gems/ruby-2.1.5#global/gems/bundler-1.7.6/lib/bundler.rb:133:in `require'
from /home/ubuntu/workspace/hello_app/config/application.rb:7:in `<top (required)>'
from /usr/local/rvm/gems/ruby-2.1.5#rails4/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:78:in `require'
from /usr/local/rvm/gems/ruby-2.1.5#rails4/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:78:in `block in server'
from /usr/local/rvm/gems/ruby-2.1.5#rails4/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:75:in `tap'
from /usr/local/rvm/gems/ruby-2.1.5#rails4/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:75:in `server'
from /usr/local/rvm/gems/ruby-2.1.5#rails4/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
from /usr/local/rvm/gems/ruby-2.1.5#rails4/gems/railties-4.2.0/lib/rails/commands.rb:17:in `<top (required)>'
from /home/ubuntu/workspace/hello_app/bin/rails:8:in `require'
from /home/ubuntu/workspace/hello_app/bin/rails:8:in `<top (required)>'
from /usr/local/rvm/gems/ruby-2.1.5#rails4/gems/spring-1.1.3/lib/spring/client/rails.rb:27:in `load'
from /usr/local/rvm/gems/ruby-2.1.5#rails4/gems/spring-1.1.3/lib/spring/client/rails.rb:27:in `call'
from /usr/local/rvm/gems/ruby-2.1.5#rails4/gems/spring-1.1.3/lib/spring/client/command.rb:7:in `call'
from /usr/local/rvm/gems/ruby-2.1.5#rails4/gems/spring-1.1.3/lib/spring/client.rb:26:in `run'
from /usr/local/rvm/gems/ruby-2.1.5#rails4/gems/spring-1.1.3/bin/spring:48:in `<top (required)>'
from /usr/local/rvm/gems/ruby-2.1.5#rails4/gems/spring-1.1.3/lib/spring/binstub.rb:11:in `load'
from /usr/local/rvm/gems/ruby-2.1.5#rails4/gems/spring-1.1.3/lib/spring/binstub.rb:11:in `<top (required)>'
from /home/ubuntu/workspace/hello_app/bin/spring:13:in `require'
from /home/ubuntu/workspace/hello_app/bin/spring:13:in `<top (required)>'
from bin/rails:3:in `load'
from bin/rails:3:in `<main>'
I tried the running the servers before changing the Gemfile, and it works, so it must be because of the new changes. Also I'm aware in the error it says ruby-2.1.5, and in my Gemfile I put 4.2.0 but I have no clue how to change this, or if this is even the problem? i tried to add ruby '2.1.5' under the source line, nothing changed. Also I changed 'rails', '4.2.0' to 2.1.5 but then the update failed telling me Could not find gem 'rails (= 2.1.5) ruby' in the gems available on this machine.

As said here:
https://github.com/josh/sprockets-es6/issues/15
Use sass-rails v 5.0.2+. This should solve your issue. So in the gem file change:
gem 'sass-rails', '5.0.3'
or
gem 'sass-rails', '5.0.2'
Update:
As the link is down now so this issue is actually with the gem version 5.0.1 so just run:
bundle update sass-rails
which ultimately updates you saas-rails gem to the latest one. Or you can enter the version in your gemfile as specified above.

bundle update sass-rails did the trick for me when upgrading to Rails 4.2.2.

Related

LoadError in Devise (Cannot load bcrypt)

So I'm having issues with creating users with Devise.
It's an issue with "bcrypt".
Here is the error that's being generated
I looked at a few similar threads here and the solution was to install the bcrypt gem for Ruby.
And so I went to rubygems.org and added the line in gem file then ran bundle install.
However, after that I try to run the server but it fails for some reason. Server won't start. Here is the error I received in GitBash:
Zak#ZAKARIA ~/Desktop/Work/raddit (add_users)
$ rails s
c:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/activesupport-5.0.2/lib/active_support/dependen
cies.rb:293:in `require': cannot load such file -- bcrypt_ext (LoadError)
from c:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/activesupport-5.0.2/lib/active_sup
port/dependencies.rb:293:in `block in require'
from c:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/activesupport-5.0.2/lib/active_sup
port/dependencies.rb:259:in `load_dependency'
from c:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/activesupport-5.0.2/lib/active_sup
port/dependencies.rb:293:in `require'
from c:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/bcrypt-3.1.11-x86-mingw32/lib/bcry
pt.rb:16:in `rescue in <top (required)>'
from c:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/bcrypt-3.1.11-x86-mingw32/lib/bcry
pt.rb:12:in `<top (required)>'
from c:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/bundler-1.13.7/lib/bundler/runtime
.rb:91:in `require'
from c:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/bundler-1.13.7/lib/bundler/runtime
.rb:91:in `block (2 levels) in require'
from c:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/bundler-1.13.7/lib/bundler/runtime
.rb:86:in `each'
from c:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/bundler-1.13.7/lib/bundler/runtime
.rb:86:in `block in require'
from c:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/bundler-1.13.7/lib/bundler/runtime
.rb:75:in `each'
from c:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/bundler-1.13.7/lib/bundler/runtime
.rb:75:in `require'
from c:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/bundler-1.13.7/lib/bundler.rb:106:
in `require'
from c:/Users/Zak/Desktop/Work/raddit/config/application.rb:7:in `<top (required)>'
from c:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/railties-5.0.2/lib/rails/commands/
commands_tasks.rb:88:in `require'
from c:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/railties-5.0.2/lib/rails/commands/
commands_tasks.rb:88:in `block in server'
from c:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/railties-5.0.2/lib/rails/commands/
commands_tasks.rb:85:in `tap'
from c:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/railties-5.0.2/lib/rails/commands/
commands_tasks.rb:85:in `server'
from c:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/railties-5.0.2/lib/rails/commands/
commands_tasks.rb:49:in `run_command!'
from c:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/railties-5.0.2/lib/rails/commands.
rb:18:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
NOTE: Before adding the gem, the server would run just fine.
Also here is my gem file
gem 'rails', '~> 5.0.2'
gem 'sqlite3'
gem 'puma', '~> 3.0'
gem 'sass-rails', '~> 5.0'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.2'
gem 'devise', '~> 4.2', '>= 4.2.1'
gem 'jquery-rails'
gem 'turbolinks', '~> 5'
gem 'jbuilder', '~> 2.5'
gem 'bcrypt', '~> 3.1', '>= 3.1.11'
group :development, :test do
gem 'byebug', platform: :mri
end
group :development do
gem 'web-console', '>= 3.3.0'
end
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
I don't think you need to set the explicitly bcrypt in your Gemfile. Devise already includes bcrypt as a runtime dependency. Try to remove the bcrypt gem from your Gemfile, run bundle update and the restart your server. That worked for me.
Based on ajeferson's asnwer.
This thread has the solution: github.com/codahale/bcrypt-ruby/issues/142
I had the same issue, and for me, whenever I run bundle install, it installs two versions of bcrypt:
bcrypt-3.1.11
bcrypt-3.1.11-x86-mingw32
Therefore, If I just executed "gem uninstall bcrypt" and deleted the (2), then it worked fine.
To make sure it will not be installed again, I specify the platform on my Gemfile, like this:
gem 'bcrypt', platform: :ruby

Sass error active admin in Rails 5

I trying to run my server but I have always the same error... I dont find the solution. I search in github and on google nothing work...
Do you have idea ?
rails s
/home/nicolas/.gem/ruby/2.3.0/gems/bundler-1.13.6/lib/bundler/runtime.rb:94:in `rescue in block (2 levels) in require': There was an error while trying to load the gem 'sass-rails'. (Bundler::GemRequireError)
Gem Load Error is: uninitialized constant Sass::Script
Backtrace for gem load error is:
/home/nicolas/.gem/ruby/2.3.0/gems/sass-rails-5.0.6/lib/sass/rails/helpers.rb:12:in `<top (required)>'
/home/nicolas/.gem/ruby/2.3.0/gems/sass-rails-5.0.6/lib/sass/rails.rb:8:in `<top (required)>'
/home/nicolas/.gem/ruby/2.3.0/gems/sass-rails-5.0.6/lib/sass-rails.rb:1:in `<top (required)>'
/home/nicolas/.gem/ruby/2.3.0/gems/bundler-1.13.6/lib/bundler/runtime.rb:91:in `require'
/home/nicolas/.gem/ruby/2.3.0/gems/bundler-1.13.6/lib/bundler/runtime.rb:91:in `block (2 levels) in require'
/home/nicolas/.gem/ruby/2.3.0/gems/bundler-1.13.6/lib/bundler/runtime.rb:86:in `each'
/home/nicolas/.gem/ruby/2.3.0/gems/bundler-1.13.6/lib/bundler/runtime.rb:86:in `block in require'
/home/nicolas/.gem/ruby/2.3.0/gems/bundler-1.13.6/lib/bundler/runtime.rb:75:in `each'
/home/nicolas/.gem/ruby/2.3.0/gems/bundler-1.13.6/lib/bundler/runtime.rb:75:in `require'
/home/nicolas/.gem/ruby/2.3.0/gems/bundler-1.13.6/lib/bundler.rb:106:in `require'
/home/nicolas/Bureau/rails/site/campsite/config/application.rb:7:in `<top (required)>'
/home/nicolas/.gem/ruby/2.3.0/gems/railties-5.0.0.1/lib/rails/commands/commands_tasks.rb:88:in `require'
/home/nicolas/.gem/ruby/2.3.0/gems/railties-5.0.0.1/lib/rails/commands/commands_tasks.rb:88:in `block in server'
/home/nicolas/.gem/ruby/2.3.0/gems/railties-5.0.0.1/lib/rails/commands/commands_tasks.rb:85:in `tap'
/home/nicolas/.gem/ruby/2.3.0/gems/railties-5.0.0.1/lib/rails/commands/commands_tasks.rb:85:in `server'
/home/nicolas/.gem/ruby/2.3.0/gems/railties-5.0.0.1/lib/rails/commands/commands_tasks.rb:49:in `run_command!'
/home/nicolas/.gem/ruby/2.3.0/gems/railties-5.0.0.1/lib/rails/commands.rb:18:in `<top (required)>'
bin/rails:4:in `require'
bin/rails:4:in `<main>'
Bundler Error Backtrace:
from /home/nicolas/.gem/ruby/2.3.0/gems/bundler-1.13.6/lib/bundler/runtime.rb:90:in `block (2 levels) in require'
from /home/nicolas/.gem/ruby/2.3.0/gems/bundler-1.13.6/lib/bundler/runtime.rb:86:in `each'
from /home/nicolas/.gem/ruby/2.3.0/gems/bundler-1.13.6/lib/bundler/runtime.rb:86:in `block in require'
from /home/nicolas/.gem/ruby/2.3.0/gems/bundler-1.13.6/lib/bundler/runtime.rb:75:in `each'
from /home/nicolas/.gem/ruby/2.3.0/gems/bundler-1.13.6/lib/bundler/runtime.rb:75:in `require'
from /home/nicolas/.gem/ruby/2.3.0/gems/bundler-1.13.6/lib/bundler.rb:106:in `require'
from /home/nicolas/Bureau/rails/site/campsite/config/application.rb:7:in `<top (required)>'
from /home/nicolas/.gem/ruby/2.3.0/gems/railties-5.0.0.1/lib/rails/commands/commands_tasks.rb:88:in `require'
from /home/nicolas/.gem/ruby/2.3.0/gems/railties-5.0.0.1/lib/rails/commands/commands_tasks.rb:88:in `block in server'
from /home/nicolas/.gem/ruby/2.3.0/gems/railties-5.0.0.1/lib/rails/commands/commands_tasks.rb:85:in `tap'
from /home/nicolas/.gem/ruby/2.3.0/gems/railties-5.0.0.1/lib/rails/commands/commands_tasks.rb:85:in `server'
from /home/nicolas/.gem/ruby/2.3.0/gems/railties-5.0.0.1/lib/rails/commands/commands_tasks.rb:49:in `run_command!'
from /home/nicolas/.gem/ruby/2.3.0/gems/railties-5.0.0.1/lib/rails/commands.rb:18:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
My gemfile
source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 5.0.0'
# Use sqlite3 as the database for Active Record
gem 'sqlite3'
#gem 'pg'
# Use Puma as the app server
gem 'puma', '~> 3.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.2'
#Recherche
gem 'elasticsearch-rails'
gem 'elasticsearch-model'
gem 'searchkick'
#Pagination
gem 'kaminari'
#Google map
gem 'gmaps4rails'
#Gem pour faciliter les scopes des recherches
gem 'has_scope'
gem 'record_tag_helper', '~> 1.0'
#Upload d'images
gem 'carrierwave'
#activeadmin
gem 'sass-rails'
gem 'activeadmin', '~> 1.0.0.pre4'
gem 'inherited_resources', :git => "https://github.com/activeadmin/inherited_resources.git"
gem 'ransack', :git => "https://github.com/activerecord-hackery/ransack.git"
gem 'draper', '> 3.x'
gem 'devise'
gem 'cancancan'
gem "rolify"
# Use jquery as the JavaScript library
gem 'jquery-rails'
gem 'jquery-ui-rails'
gem 'gmaps-autocomplete-rails'
# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
gem 'turbolinks', '~> 5'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.5'
#geocoder
gem 'geocoder'
#ImageUploader
gem "paperclip"
#friendly url
gem 'friendly_id'
#balise SEO
gem 'meta-tags'
#bootstrap
gem 'bootstrap-sass', '~> 3.3.6'
#Traduction
gem 'rails-i18n', '~> 5.0.0' # For 5.0.x
#mailboxer
gem 'mailboxer', :git => "https://github.com/mailboxer/mailboxer.git"
#uploadimage
gem 'jquery-fileupload-rails'
#gem 'inherited_resources', :git => "https://github.com/activeadmin/inherited_resources.git"
gem "font-awesome-rails"
# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development
group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug', platform: :mri
end
group :development do
# Access an IRB console on exception pages or by using <%= console %> anywhere in the code.
gem 'web-console'
end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
If you need more details I can paste my other file. Just ask me ;)
EDIT
Gist link Here

`rails s` says "`require': cannot load such file -- pty (LoadError)" in Windows RailsInstaller

I have just installed RailsInstaller on my Windows 10 PC. I am not able to run rails s or rails g controller StaticPages home help.
I have also tried to fix this by installing the zeus gem as suggested by this related StackOverflow question but had no success.
Gemfile:
source 'https://rubygems.org'
gem 'rails', '4.2.2'
gem 'sass-rails', '5.0.2'
gem 'uglifier', '2.5.3'
gem 'coffee-rails', '4.1.0'
gem 'jquery-rails', '4.0.3'
gem 'turbolinks', '2.3.0'
gem 'jbuilder', '2.2.3'
gem 'sdoc', '0.4.0', group: :doc
gem 'pry-nav', group: [:development, :test]
group :development, :test do
gem 'sqlite3', '>= 1.3.9'
gem 'byebug', '3.4.0'
gem 'web-console', '2.0.0.beta3'
gem 'spring', '1.1.3'
end
group :test do
gem 'minitest-reporters', '1.0.5'
gem 'mini_backtrace', '0.1.3'
gem 'guard-minitest', '2.3.1'
end
group :production do
gem 'pg', '0.17.1'
gem 'rails_12factor', '0.0.2'
end
Errors:
rails s
c:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/web-console-2.0.0.beta3/lib/web_console/slave.rb:1:in `require': cannot load such file -- pty (LoadError)
from c:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/web-console-2.0.0.beta3/lib/web_console/slave.rb:1:in `<top (required)>'
from c:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/web-console-2.0.0.beta3/lib/web_console.rb:13:in `require'
from c:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/web-console-2.0.0.beta3/lib/web_console.rb:13:in `<top (required)>'
from c:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/web-console-2.0.0.beta3/lib/web-console.rb:1:in `require'
from c:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/web-console-2.0.0.beta3/lib/web-console.rb:1:in `<top (required)>'
from c:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:77:in `require'
from c:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:77:in `block (2 levels) in require'
from c:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:72:in `each'
from c:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:72:in `block in require'
from c:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:61:in `each'
from c:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:61:in `require'
from c:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler.rb:99:in `require'
from c:/Sites/sample_app/config/application.rb:7:in `<top (required)>'
from c:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/railties-4.2.2/lib/rails/commands/commands_tasks.rb:78:in `require'
from c:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/railties-4.2.2/lib/rails/commands/commands_tasks.rb:78:in `block in server'
from c:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/railties-4.2.2/lib/rails/commands/commands_tasks.rb:75:in `tap'
from c:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/railties-4.2.2/lib/rails/commands/commands_tasks.rb:75:in `server'
from c:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/railties-4.2.2/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
from c:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/railties-4.2.2/lib/rails/commands.rb:17:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
The backtrace tells us that the web-console gem wants Ruby's pty library. Unfortunately PTYs (pseudo-terminals) are a Unix/Linux feature which does not exist on Windows, so that Ruby library doesn't either.
You can get moving in a couple of ways:
If you don't care about the web-console gem right now, just remove it from your Gemfile.
If you really need the web-console gem, try replacing web-console with these gems:
gem 'rubysl-pty', platforms: :ruby
gem 'web-console-rails3', platforms: :ruby
Source: a web-console Github issue.
I solve this issue by following below steps:
First check your Gemfile.lock, if you have mentioned bcrypt version over there then you don't need to mention the bcrypt version in Gemfile.
If bcrypt version is missing in the Gemfile.lock then in the perform following steps:
a) gem install bcrypt
b) Open your Gemfile and paste "gem 'bcrypt', '~> 3.1.7'"
c) run command in console : bundle install
I hope by following above given steps might solve your problem.

Errors while setting up rubymine

After re-installing ruby and doing countless bundle install's I keep on getting this error when I try to run debug, please help:
Uncaught exception: cannot load such file -- js_regex
/usr/local/lib/ruby/gems/2.2.0/gems/activesupport-4.1.6/lib/active_support/dependencies.rb:247:in `require'
/usr/local/lib/ruby/gems/2.2.0/gems/activesupport-4.1.6/lib/active_support/dependencies.rb:247:in `block in require'
/usr/local/lib/ruby/gems/2.2.0/gems/activesupport-4.1.6/lib/active_support/dependencies.rb:232:in `load_dependency'
/usr/local/lib/ruby/gems/2.2.0/gems/activesupport-4.1.6/lib/active_support/dependencies.rb:247:in `require'
/home/elena/.bundler/ruby/2.2.0/client_side_validations-9942c8cc822d/lib/client_side_validations/core_ext/regexp.rb:1:in `<top (required)>'
/usr/local/lib/ruby/gems/2.2.0/gems/activesupport-4.1.6/lib/active_support/dependencies.rb:247:in `require'
/usr/local/lib/ruby/gems/2.2.0/gems/activesupport-4.1.6/lib/active_support/dependencies.rb:247:in `block in require'
/usr/local/lib/ruby/gems/2.2.0/gems/activesupport-4.1.6/lib/active_support/dependencies.rb:232:in `load_dependency'
/usr/local/lib/ruby/gems/2.2.0/gems/activesupport-4.1.6/lib/active_support/dependencies.rb:247:in `require'
/home/elena/.bundler/ruby/2.2.0/client_side_validations-9942c8cc822d/lib/client_side_validations/core_ext.rb:3:in `<top (required)>'
/usr/local/lib/ruby/gems/2.2.0/gems/activesupport-4.1.6/lib/active_support/dependencies.rb:247:in `require'
/usr/local/lib/ruby/gems/2.2.0/gems/activesupport-4.1.6/lib/active_support/dependencies.rb:247:in `block in require'
/usr/local/lib/ruby/gems/2.2.0/gems/activesupport-4.1.6/lib/active_support/dependencies.rb:232:in `load_dependency'
/usr/local/lib/ruby/gems/2.2.0/gems/activesupport-4.1.6/lib/active_support/dependencies.rb:247:in `require'
/home/elena/.bundler/ruby/2.2.0/client_side_validations-9942c8cc822d/lib/client_side_validations/active_model.rb:1:in `<top (required)>'
/usr/local/lib/ruby/gems/2.2.0/gems/activesupport-4.1.6/lib/active_support/dependencies.rb:247:in `require'
/usr/local/lib/ruby/gems/2.2.0/gems/activesupport-4.1.6/lib/active_support/dependencies.rb:247:in `block in require'
/usr/local/lib/ruby/gems/2.2.0/gems/activesupport-4.1.6/lib/active_support/dependencies.rb:232:in `load_dependency'
/usr/local/lib/ruby/gems/2.2.0/gems/activesupport-4.1.6/lib/active_support/dependencies.rb:247:in `require'
/home/elena/.bundler/ruby/2.2.0/client_side_validations-9942c8cc822d/lib/client_side_validations.rb:5:in `<top (required)>'
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:77:in `require'
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:77:in `block (2 levels) in require'
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:72:in `each'
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:72:in `block in require'
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:61:in `each'
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:61:in `require'
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler.rb:99:in `require'
/home/elena/Dev/tibdit-application/config/application.rb:7:in `<top (required)>'
/usr/local/lib/ruby/gems/2.2.0/gems/railties-4.1.6/lib/rails/commands/commands_tasks.rb:79:in `require'
/usr/local/lib/ruby/gems/2.2.0/gems/railties-4.1.6/lib/rails/commands/commands_tasks.rb:79:in `block in server'
/usr/local/lib/ruby/gems/2.2.0/gems/railties-4.1.6/lib/rails/commands/commands_tasks.rb:76:in `tap'
/usr/local/lib/ruby/gems/2.2.0/gems/railties-4.1.6/lib/rails/commands/commands_tasks.rb:76:in `server'
/usr/local/lib/ruby/gems/2.2.0/gems/railties-4.1.6/lib/rails/commands/commands_tasks.rb:40:in `run_command!'
/usr/local/lib/ruby/gems/2.2.0/gems/railties-4.1.6/lib/rails/commands.rb:17:in `<top (required)>'
/usr/local/lib/ruby/gems/2.2.0/gems/railties-4.1.6/lib/rails/app_rails_loader.rb:43:in `require'
/usr/local/lib/ruby/gems/2.2.0/gems/railties-4.1.6/lib/rails/app_rails_loader.rb:43:in `block in exec_app_rails'
/usr/local/lib/ruby/gems/2.2.0/gems/railties-4.1.6/lib/rails/app_rails_loader.rb:32:in `loop'
/usr/local/lib/ruby/gems/2.2.0/gems/railties-4.1.6/lib/rails/app_rails_loader.rb:32:in `exec_app_rails'
/usr/local/lib/ruby/gems/2.2.0/gems/railties-4.1.6/lib/rails/cli.rb:5:in `<top (required)>'
/usr/local/lib/ruby/gems/2.2.0/gems/railties-4.1.6/bin/rails:9:in `require'
/usr/local/lib/ruby/gems/2.2.0/gems/railties-4.1.6/bin/rails:9:in `<top (required)>'
/home/elena/Dev/tibdit-application/bin/rails:16:in `load'
/home/elena/Dev/tibdit-application/bin/rails:16:in `<top (required)>'
My gem file:
ruby '2.2.1'
source 'http://rubygems.org'
gem 'rails', '4.1.6'
gem 'sass-rails', '~> 5.0'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails'
gem 'node', platforms: :ruby
gem 'jquery-rails', '~> 3.1.0'
gem 'jbuilder', '~> 2.0'
gem 'awesome_print'
gem 'devise', '~> 3.5.1'
gem 'opengraph_parser'
gem 'blockchain'
gem 'block_io'
gem 'newrelic_rpm'
gem 'byebug'
gem 'geoip'
gem 'metainspector', '~> 4.7.2'
gem 'sidekiq'
gem 'htmlentities'
gem 'redis-rails'
gem 'redis-namespace'
gem 'redis'
gem 'redis-rack-cache'
gem 'faraday-http-cache'
gem 'haml'
gem 'uuid'
gem 'curb'
gem 'pismo'
gem 'draper'
gem 'bootstrap-sass'
gem 'autoprefixer-rails'
gem 'select2-rails'
gem 'nokogiri'
gem 'rack-rewrite'
gem 'font-awesome-rails'
gem 'workflow'
gem 'ruby-graphviz'
gem 'execjs'
gem 'therubyracer', :platforms => :ruby # helps execjs run
gem 'kaminari'
gem 'client_side_validations', github: 'DavyJonesLocker/client_side_validations'
gem 'activerecord-session_store'
gem 'exception_notification', '4.0.1'
gem 'pg'
gem 'valid_email', require: 'valid_email/validate_email'
gem 'devise_zxcvbn', github: 'bitzesty/devise_zxcvbn'
group :doc do
gem 'sdoc', '~> 0.4.0'
end
gem 'cryptopay'
gem 'bitbank'
gem 'bitcoin-ruby', require: 'bitcoin'
gem 'tzinfo-data'
gem 'omniauth-google-oauth2', '~> 0.2.8'
gem 'omniauth-linkedin-oauth2'
gem 'omniauth-facebook'
gem 'omniauth-github'
gem 'twitter'
gem 'omniauth-twitter'
gem 'rest-client', '~> 1.6.3'
gem 'griddler'
gem 'griddler-mandrill'
group :development, :test do
gem 'logstasher'
gem 'spring'
gem 'better_errors'
gem 'rspec-rails'
gem 'factory_girl_rails'
end
group :test do
gem "mailcatcher"
gem "faker"
gem "capybara"
gem "database_cleaner"
gem "launchy"
gem "poltergeist"
end
group :heroku, :production do
gem 'rails_12factor'
gem 'puma'
end
gem 'materialize-sass'
gem 'es5-shim-rails'
gem 'prefixfree-rails'
I can run the rails server from terminal, but not using rubymine.
I've also manually installed gem js_regex but still got that error
Solved it by uninstalling activerecord and installing it again, then deleted the Gemfile.lock and ran bundle install --path vendor/cache from this answer.
My colleague and I think that something went wrong when I installed Bundler and that --path vendoe/cache param fixed it but we're not sure and the stackoverflow answer didn't have an explanation either..

jasmine-rails gem not working, sass error

I'm getting the following error after trying to add jasmine to my rails 4 project
rails g jasmine:install
/Users/harrymoreno/.rvm/gems/ruby-2.1.0/gems/sass-3.3.0.rc.2/lib/sass/util.rb:1132:in `module_function': undefined method `singleton_class?' for module `Sass::Util' (NameError)
from /Users/harrymoreno/.rvm/gems/ruby-2.1.0/gems/sass-3.3.0.rc.2/lib/sass/util.rb:1132:in `block in <module:Util>'
from /Users/harrymoreno/.rvm/gems/ruby-2.1.0/gems/sass-3.3.0.rc.2/lib/sass/util.rb:1132:in `each'
from /Users/harrymoreno/.rvm/gems/ruby-2.1.0/gems/sass-3.3.0.rc.2/lib/sass/util.rb:1132:in `<module:Util>'
from /Users/harrymoreno/.rvm/gems/ruby-2.1.0/gems/sass-3.3.0.rc.2/lib/sass/util.rb:14:in `<module:Sass>'
from /Users/harrymoreno/.rvm/gems/ruby-2.1.0/gems/sass-3.3.0.rc.2/lib/sass/util.rb:12:in `<top (required)>'
from /Users/harrymoreno/.rvm/gems/ruby-2.1.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `require'
from /Users/harrymoreno/.rvm/gems/ruby-2.1.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `block in require'
from /Users/harrymoreno/.rvm/gems/ruby-2.1.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:213:in `load_dependency'
from /Users/harrymoreno/.rvm/gems/ruby-2.1.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `require'
from /Users/harrymoreno/.rvm/gems/ruby-2.1.0/gems/sass-3.3.0.rc.2/lib/sass/version.rb:2:in `<top (required)>'
from /Users/harrymoreno/.rvm/gems/ruby-2.1.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `require'
from /Users/harrymoreno/.rvm/gems/ruby-2.1.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `block in require'
from /Users/harrymoreno/.rvm/gems/ruby-2.1.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:213:in `load_dependency'
from /Users/harrymoreno/.rvm/gems/ruby-2.1.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `require'
from /Users/harrymoreno/.rvm/gems/ruby-2.1.0/gems/sass-3.3.0.rc.2/lib/sass.rb:9:in `<top (required)>'
from /Users/harrymoreno/.rvm/gems/ruby-2.1.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `require'
from /Users/harrymoreno/.rvm/gems/ruby-2.1.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `block in require'
from /Users/harrymoreno/.rvm/gems/ruby-2.1.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:213:in `load_dependency'
from /Users/harrymoreno/.rvm/gems/ruby-2.1.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `require'
from /Users/harrymoreno/.rvm/gems/ruby-2.1.0/gems/bootstrap-sass-3.0.3.0/lib/bootstrap-sass/sass_functions.rb:1:in `<top (required)>'
from /Users/harrymoreno/.rvm/gems/ruby-2.1.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `require'
from /Users/harrymoreno/.rvm/gems/ruby-2.1.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `block in require'
from /Users/harrymoreno/.rvm/gems/ruby-2.1.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:213:in `load_dependency'
from /Users/harrymoreno/.rvm/gems/ruby-2.1.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `require'
from /Users/harrymoreno/.rvm/gems/ruby-2.1.0/gems/bootstrap-sass-3.0.3.0/lib/bootstrap-sass.rb:7:in `load!'
from /Users/harrymoreno/.rvm/gems/ruby-2.1.0/gems/bootstrap-sass-3.0.3.0/lib/bootstrap-sass.rb:76:in `<top (required)>'
from /Users/harrymoreno/.rvm/gems/ruby-2.1.0#global/gems/bundler-1.5.1/lib/bundler/runtime.rb:76:in `require'
from /Users/harrymoreno/.rvm/gems/ruby-2.1.0#global/gems/bundler-1.5.1/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
from /Users/harrymoreno/.rvm/gems/ruby-2.1.0#global/gems/bundler-1.5.1/lib/bundler/runtime.rb:72:in `each'
from /Users/harrymoreno/.rvm/gems/ruby-2.1.0#global/gems/bundler-1.5.1/lib/bundler/runtime.rb:72:in `block in require'
from /Users/harrymoreno/.rvm/gems/ruby-2.1.0#global/gems/bundler-1.5.1/lib/bundler/runtime.rb:61:in `each'
from /Users/harrymoreno/.rvm/gems/ruby-2.1.0#global/gems/bundler-1.5.1/lib/bundler/runtime.rb:61:in `require'
from /Users/harrymoreno/.rvm/gems/ruby-2.1.0#global/gems/bundler-1.5.1/lib/bundler.rb:131:in `require'
from config/application.rb:7:in `<top (required)>'
from /Users/harrymoreno/.rvm/gems/ruby-2.1.0/gems/railties-4.0.0/lib/rails/commands.rb:44:in `require'
from /Users/harrymoreno/.rvm/gems/ruby-2.1.0/gems/railties-4.0.0/lib/rails/commands.rb:44:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
Gemfile
source 'https://rubygems.org'
ruby '2.1.0'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.0.0'
# Use sqlite3 as the database for Active Record
#gem 'sqlite3'
gem 'pg'
gem 'devise'
gem 'font-awesome-rails'
gem 'bootstrap-sass', '~> 3.0.3.0'
gem 'simple_form', git: 'https://github.com/plataformatec/simple_form.git'
gem 'carrierwave'
gem 'fog', '~> 1.3.1'
gem 'mini_magick'
gem 'rails_12factor'
gem 'friendly_id', '~> 5.0.0'
gem 'feedzirra'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.0'
gem 'bourbon'
group :development do
gem 'sass-rails-source-maps'
end
group :development, :test do
gem 'jasmine'
end
# 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', '~> 3.0'
# 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]
any ideas on what the problem might be?
The solution is to specify the latest version of sass in your gemfile
gem 'sass', git: 'https://github.com/nex3/sass.git'
the issue was solved just 17 days ago here https://github.com/nex3/sass/issues/1057?source=cc

Resources