I have just installed the latest RubyMine (2018.1.1) and I created a Rails 5.2 application using the wizard in RubyMine. I then generated a single scaffold so that I would have something to test with.
If I set a breakpoint inside a unit test, the breakpoint works. However, if I run the web server (I tried both - the default Puma and WEBrick), no breakpoints work. I can see the print statements from my controller, but the breakpoint is never triggered.
What am I doing wrong?
Here's the list of my gems:
actioncable (5.2.0)
actionmailer (5.2.0)
actionpack (5.2.0)
actionview (5.2.0)
activejob (5.2.0)
activemodel (5.2.0)
activerecord (5.2.0)
activestorage (5.2.0)
activesupport (5.2.0)
addressable (2.5.2)
archive-zip (0.11.0)
arel (9.0.0)
bigdecimal (default: 1.3.4)
bindex (0.5.0)
bootsnap (1.3.0)
builder (3.2.3)
bundler (1.16.1)
byebug (10.0.2)
capybara (3.0.3)
childprocess (0.9.0)
chromedriver-helper (1.2.0)
cmath (default: 1.0.0)
coffee-rails (4.2.2)
coffee-script (2.4.1)
coffee-script-source (1.12.2)
concurrent-ruby (1.0.5)
crass (1.0.4)
csv (default: 1.0.0)
date (default: 1.0.0)
debase (0.2.2)
debase-ruby_core_source (0.10.3)
erubi (1.7.1)
etc (default: 1.0.0)
execjs (2.7.0)
fcntl (default: 1.0.0)
ffi (1.9.23)
fiddle (default: 1.0.0)
fileutils (default: 1.0.2)
globalid (0.4.1)
i18n (1.0.1)
io-console (default: 0.4.6)
io-like (0.3.0)
ipaddr (default: 1.2.0)
jbuilder (2.7.0)
json (default: 2.1.0)
listen (3.1.5)
loofah (2.2.2)
mail (2.7.0)
marcel (0.3.2)
method_source (0.9.0)
mimemagic (0.3.2)
mini_mime (1.0.0)
mini_portile2 (2.3.0)
minitest (5.11.3)
msgpack (1.2.4)
multi_json (1.13.1)
nio4r (2.3.0)
nokogiri (1.8.2)
openssl (default: 2.1.0)
psych (default: 3.0.2)
public_suffix (3.0.2)
puma (3.11.4)
rack (2.0.5)
rack-test (1.0.0)
rails (5.2.0)
rails-dom-testing (2.0.3)
rails-html-sanitizer (1.0.4)
railties (5.2.0)
rake (12.3.1)
rb-fsevent (0.10.3)
rb-inotify (0.9.10)
rdoc (default: 6.0.1)
ruby-debug-ide (0.7.0.beta4)
ruby_dep (1.5.0)
rubyzip (1.2.1)
sass (3.5.6)
sass-listen (4.0.0)
sass-rails (5.0.7)
scanf (default: 1.0.0)
sdbm (default: 1.0.0)
selenium-webdriver (3.11.0)
spring (2.0.2)
spring-watcher-listen (2.0.1)
sprockets (3.7.1)
sprockets-rails (3.2.1)
sqlite3 (1.3.13)
stringio (default: 0.0.1)
strscan (default: 1.0.0)
thor (0.20.0)
thread_safe (0.3.6)
tilt (2.0.8)
turbolinks (5.1.1)
turbolinks-source (5.1.0)
tzinfo (1.2.5)
uglifier (4.1.10)
web-console (3.6.2)
webrick (default: 1.4.2)
websocket-driver (0.7.0)
websocket-extensions (0.1.3)
xpath (3.0.0)
zlib (default: 1.0.0)
I am using ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-linux]
This problem is documented here: https://youtrack.jetbrains.com/issue/RUBY-20684
There's also a workaround specified: comment bootsnap requiring in the Gemfile and in the boot.rb
Commenting out bootsnap worked for me - breakpoints now work.
I'm new to Rails and trying to load and configure it for the first time. I'm following the instructions on http://installrails.com/steps/rails_for_linux_and_other for installing on Linux (I'm actually using an Ubuntu Virtual Machine that is installed on a Windows 10 Host).
I keep getting this error:
`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::Rails::Tilt
There is nothing that seems to be able to tell me what to do from here. I've actually uninstalled, and re-installed Rails once, because I thought my Rails version was creating problems (I did have Rails 5.1.1), but the same thing is happening now (with Rails 4.2.6).
Ruby Version:
ruby 2.3.3p222 (2016-11-21 revision 56859) [x86_64-linux]
Gem List:
*** LOCAL GEMS ***
actioncable (5.1.1)
actionmailer (5.1.1, 4.2.6)
actionpack (5.1.1, 4.2.6)
actionview (5.1.1, 4.2.6)
activejob (5.1.1, 4.2.6)
activemodel (5.1.1, 4.2.6)
activerecord (5.1.1, 4.2.6)
activesupport (5.1.1, 4.2.6)
addressable (2.5.1)
arel (8.0.0, 6.0.4)
bigdecimal (1.2.8)
bindex (0.5.0)
binding_of_caller (0.7.2)
builder (3.2.3)
bundler (1.14.6)
bundler-unload (1.0.2)
byebug (9.0.6)
capybara (2.14.0)
childprocess (0.7.0)
coffee-rails (4.2.1, 4.1.1)
coffee-script (2.4.1)
coffee-script-source (1.12.2)
concurrent-ruby (1.0.5)
debug_inspector (0.0.3)
did_you_mean (1.0.0)
erubi (1.6.0)
erubis (2.7.0)
execjs (2.7.0)
executable-hooks (1.3.2)
ffi (1.9.18)
gem-wrappers (1.2.7)
globalid (0.4.0)
i18n (0.8.1)
io-console (0.4.5)
jbuilder (2.6.4)
jquery-rails (4.3.1)
json (1.8.6, 1.8.3)
listen (3.1.5)
loofah (2.0.3)
mail (2.6.5)
method_source (0.8.2)
mime-types (3.1)
mime-types-data (3.2016.0521)
mini_portile2 (2.1.0)
minitest (5.10.2, 5.8.5)
multi_json (1.12.1)
mustermann (1.0.0)
net-telnet (0.1.1)
nio4r (2.0.0)
nokogiri (1.7.2)
power_assert (0.2.6)
psych (2.1.0)
public_suffix (2.0.5)
puma (3.8.2)
rack (2.0.3, 1.6.8)
rack-protection (2.0.0)
rack-test (0.6.3)
rails (4.2.6)
rails-deprecated_sanitizer (1.0.3)
rails-dom-testing (2.0.3, 1.0.8)
rails-html-sanitizer (1.0.3)
railties (4.2.6)
rake (12.0.0, 10.4.2)
rb-fsevent (0.9.8)
rb-inotify (0.9.8)
rdoc (4.3.0, 4.2.1)
ruby_dep (1.5.0)
rubygems-bundler (1.4.4)
rubyzip (1.2.1)
rvm (1.11.3.9)
sass (3.4.24)
sass-rails (5.0.6)
sdoc (0.4.2)
selenium-webdriver (3.4.0)
sinatra (2.0.0)
spring (2.0.1)
spring-watcher-listen (2.0.1)
sprockets (3.7.1)
sprockets-rails (3.2.0)
sqlite3 (1.3.13)
test-unit (3.1.5)
thor (0.19.4)
thread_safe (0.3.6)
tilt (2.0.7)
turbolinks (5.0.1)
turbolinks-source (5.0.3)
tzinfo (1.2.3)
uglifier (3.2.0)
web-console (3.5.1, 2.3.0)
websocket (1.2.4)
websocket-driver (0.6.5)
websocket-extensions (0.1.2)
xpath (2.0.0)
Thanks for any help.
try to run following command:
bundle update
If it failed then try to comment below code:
saas-rails
bundle install
I commented out
gem 'sass-rails'
Then did a
bundle update
The server seems to work now. The only thing I'm not completely sure of is if I need that gem for something. (Like I said, I'm new to Rails).
I have read a bunch of other threads similar to this, and have tried many of the suggestions to no avail. My app is running fine locally, but when I pushed to heroku after adding Stripe, it broke. Upon running heroku run rails console heroku I see I have an uninitialized constant Stripe (NameError) which is odd, since I have stripe in my gemfile (which seems to be one of the suggested fixes), have run bundle install numerous times, and it is working locally, even more odd is when I list my gems, I do not see it(Stripe). How can that be when I go to my Stripe dashboard, I can see my test transactions? Yet when I push to heroku, it is uninitialized....where do I start?
here is my gem list:
$ gem list
*** LOCAL GEMS ***
actionmailer (4.2.3, 4.2.1, 4.2.0, 4.1.8)
actionpack (4.2.3, 4.2.1, 4.2.0, 4.1.8)
actionview (4.2.3, 4.2.1, 4.2.0, 4.1.8)
activejob (4.2.3, 4.2.1, 4.2.0)
activemodel (4.2.3, 4.2.1, 4.2.0, 4.1.8)
activerecord (4.2.3, 4.2.1, 4.2.0, 4.1.8)
activesupport (4.2.3, 4.2.1, 4.2.0, 4.1.8)
addressable (2.3.8)
arel (6.0.3, 6.0.2, 6.0.0, 5.0.1.20140414130214)
awesome_print (1.6.1)
backbars (0.0.11)
backports (3.6.4)
bcrypt (3.1.10)
bcrypt-ruby (3.1.5)
best_in_place (3.0.3)
better_errors (2.1.1)
bigdecimal (1.2.4)
binding_of_caller (0.7.2)
buftok (0.2.0)
builder (3.2.2)
bundler (1.10.6, 1.10.3)
byebug (6.0.0, 5.0.0, 3.5.1)
callsite (0.0.11)
coderay (1.1.0)
coffee-rails (4.1.0, 4.0.1)
coffee-script (2.4.1, 2.3.0)
coffee-script-source (1.9.1.1, 1.8.0)
columnize (0.9.0)
commonjs (0.2.7)
daemons (1.1.9)
debug_inspector (0.0.2)
debugger-linecache (1.2.0)
descendants_tracker (0.0.4)
domain_name (0.5.24)
dotenv (2.0.2)
dotenv-rails (2.0.2)
equalizer (0.0.11)
erubis (2.7.0)
eventmachine (1.0.4)
execjs (2.6.0, 2.5.2, 2.2.2)
faraday (0.9.1)
ffaker (2.1.0, 2.0.0)
font-awesome-less (4.0.2)
foundation-rails (5.5.0.0)
git-version-bump (0.15.1)
github_api (0.12.3)
globalid (0.3.6, 0.3.5, 0.3.0)
handlebars (0.7.0)
handlebars-source (3.0.3)
handlebars_assets (0.20.2)
hashie (3.4.2)
hike (1.2.3)
http (0.6.4)
http-cookie (1.0.2)
http_parser.rb (0.6.0)
httparty (0.13.5)
i18n (0.7.0)
io-console (0.4.2)
jbuilder (2.3.1, 2.2.16, 2.2.6)
jquery-rails (4.0.4, 4.0.3, 3.1.3)
json (1.8.3, 1.8.2, 1.8.1)
jwt (1.5.0)
less (2.6.0)
less-rails (2.7.0)
libv8 (3.16.14.11 x86_64-darwin-14, 3.16.14.7 x86_64-darwin-14)
loofah (2.0.3, 2.0.2, 2.0.1)
mail (2.6.3)
memoizable (0.4.2)
meta_request (0.3.4)
method_source (0.8.2)
mime-types (2.6.1, 2.4.3)
mini_portile (0.6.2)
minitest (5.8.0, 5.7.0, 5.5.1, 4.7.5)
multi_json (1.11.2, 1.11.1, 1.11.0, 1.10.1)
multi_xml (0.5.5)
multipart-post (2.0.0)
naught (1.0.0)
netrc (0.10.3)
nokogiri (1.6.6.2, 1.6.5)
oauth2 (1.0.0)
pg (0.18.2, 0.18.1)
pry (0.10.1)
pry-rails (0.3.4)
psych (2.0.5)
quiet_assets (1.1.0)
rack (1.6.4, 1.6.1, 1.6.0, 1.5.5)
rack-contrib (1.4.0)
rack-protection (1.5.3)
rack-test (0.6.3)
rails (4.2.3, 4.2.1, 4.2.0, 4.1.8)
rails-assets-backbone (1.2.1)
rails-assets-underscore (1.8.3)
rails-deprecated_sanitizer (1.0.3)
rails-dom-testing (1.0.7, 1.0.6, 1.0.5)
rails-html-sanitizer (1.0.2, 1.0.1)
rails_12factor (0.0.3)
rails_layout (1.0.24)
rails_serve_static_assets (0.0.3)
rails_stdout_logging (0.0.3)
railties (4.2.3, 4.2.1, 4.2.0, 4.1.8)
rainbow (2.0.0)
rake (10.4.2, 10.1.0)
rdoc (4.2.0, 4.1.0)
ref (2.0.0, 1.0.5)
rest-client (1.8.0, 1.6.7)
sass (3.4.16, 3.4.14, 3.3.14, 3.2.19)
sass-rails (5.0.3, 5.0.1, 4.0.5)
sdoc (0.4.1)
select2-rails (3.5.9.3)
simple_form (3.1.0)
simple_oauth (0.3.1)
sinatra (1.4.6)
sinatra-contrib (1.4.2)
slop (3.6.0)
spring (1.3.6, 1.2.0)
sprockets (3.3.1, 3.2.0, 2.12.4, 2.12.3)
sprockets-rails (3.0.0.beta1, 2.3.2, 2.3.1, 2.2.2)
sqlite3 (1.3.10)
test-unit (2.1.2.0)
therubyracer (0.12.2)
thin (1.6.3)
thor (0.19.1)
thread_safe (0.3.5, 0.3.4)
tilt (2.0.1, 1.4.1)
turbolinks (2.5.3)
twitter (5.14.0)
tzinfo (1.2.2)
uglifier (2.7.1, 2.7.0)
unf (0.1.4)
unf_ext (0.0.7.1)
unirest (1.1.2)
web-console (2.2.1, 2.1.2, 2.0.0)
Solution:I had the gem in the development part of my gemfile
I'm following a tutorial for Rails that specifically asks for version 4.2.0 so I installed Rails with sudo gem install rails -v 4.2.0 and it worked fine. When I try to create a new application with rails _4.2.0 new test_app I get an error message that says /Library/Ruby/Site/2.0.0/rubygems/dependency.rb.315: in 'to_specs': Could not find 'railties' (=4.2.0) - did find: [railties-4.2.1] (Gem::LoadError) and continues on for a little bit more.
I've tried installing that specific version of railties with sudo gem install railties -v 4.2.0 but I still get the same error. Is it checking for/installing the gem in two different places?
EDIT: Running gem list yields the following output, clearly showing railties (4.2.0):
*** LOCAL GEMS ***
actionmailer (4.2.0)
actionpack (4.2.1, 4.2.0)
actionview (4.2.1, 4.2.0)
activejob (4.2.1, 4.2.0)
activemodel (4.2.0)
activerecord (4.2.0)
activesupport (4.2.1, 4.2.0)
arel (6.0.0)
bigdecimal (1.2.6)
builder (3.2.2)
bundler (1.9.9)
erubis (2.7.0)
globalid (0.3.5)
i18n (0.7.0)
io-console (0.4.3)
json (1.8.2, 1.8.1)
loofah (2.0.2)
mail (2.6.3)
mime-types (2.6.1)
mini_portile (0.6.2)
minitest (5.6.1, 5.4.3)
nokogiri (1.6.6.2)
power_assert (0.2.2)
psych (2.0.8)
rack (1.6.1)
rack-test (0.6.3)
rails (4.2.0)
rails-deprecated_sanitizer (1.0.3)
rails-dom-testing (1.0.6)
rails-html-sanitizer (1.0.2)
railties (4.2.0)
rake (10.4.2)
rdoc (4.2.0)
sprockets (3.1.0)
sprockets-rails (2.3.1)
test-unit (3.0.8)
thor (0.19.1)
thread_safe (0.3.5)
tzinfo (1.2.2)
You should not use sudo for installing gems. Use rbenv.
rake db:migrate
/var/lib/gems/1.9.1/gems/rake-0.8.7/lib/rake/alt_system.rb:32: Use RbConfig instead of obsolete and deprecated Config.
Getting above error on running rake db:migrate.
Below are the list of gems i have installed in my system.
* LOCAL GEMS *
actionmailer (4.1.4, 2.3.14)
actionpack (4.1.4, 2.3.14)
actionview (4.1.4)
activemodel (4.1.4)
activerecord (4.1.4, 2.3.14)
activeresource (4.0.0, 2.3.14)
activesupport (4.1.4, 2.3.14)
arel (5.0.1.20140414130214)
builder (3.2.2)
bundler (1.6.3)
childprocess (0.5.3)
domain_name (0.5.19)
erubis (2.7.0)
ffi (1.9.3)
hike (1.2.3)
http-cookie (1.0.2)
i18n (0.6.11)
json (1.8.1)
mail (2.5.4)
mechanize (2.7.3)
mime-types (2.3, 1.25.1)
mini_portile (0.6.0)
minitest (5.4.0)
multi_json (1.10.1)
mysql (2.9.1)
net-http-digest_auth (1.4)
net-http-persistent (2.9.4)
nokogiri (1.6.2.1)
ntlm-http (0.1.1)
polyglot (0.3.5)
rack (1.5.2, 1.1.6)
rack-test (0.6.2)
rails (2.3.14)
rails-observers (0.1.2)
railties (4.1.4)
rake (0.8.7)
rubyzip (1.1.6)
selenium-webdriver (2.42.0)
sprockets (2.12.1)
sprockets-rails (2.1.3)
thor (0.19.1)
thread_safe (0.3.4)
tilt (1.4.1)
treetop (1.4.15)
tzinfo (1.2.1)
unf (0.1.4)
unf_ext (0.0.6)
watir-webdriver (0.6.10)
webrobots (0.1.1)
websocket (1.1.4, 1.0.7)
Try updating Rake,the log as you posted in question shows rake 0.8.7 version , you might try removing it.
Install latest rake version, might be it resolve your problem