Ruby on Rails Runs Fine in Console, But Encounters Issues in RubyMine
Hello,
I’m currently experiencing an issue with Ruby on Rails in RubyMine. While Ruby runs perfectly fine from the console, I encounter problems when I try to run it from RubyMine.
Here are the details of my setup:
- Ruby version: 3.2.2
- RubyGems version: 3.5.7
- Rails version: 7.1.3.2
- RubyMine version: RM-233.15026.14
- Operating System: fedora 39
When using rails from the terminal everything is working but when trying to run any bundle or rails command from RubyMine it doesn't work even when i make a new project i have to specify --skip-bundle and then use bundle install from the terminal.
for example when i run rails generate controller from RubyMine i get this error :
/usr/bin/ruby -x /usr/bin/bundle exec /usr/bin/ruby /home/aminkhalsi/RubymineProjects/untitled14/bin/rails generate controller home index -s
Could not find sprockets-rails-3.4.2, sqlite3-1.7.3-x86_64-linux, puma-6.4.2, importmap-rails-2.0.1, turbo-rails-2.0.5, stimulus-rails-1.3.3, jbuilder-2.11.5, bootsnap-1.18.3, debug-1.9.1, web-console-4.2.1, capybara-3.40.0, selenium-webdriver-4.18.1, sprockets-4.2.1, msgpack-1.7.2, bindex-0.8.1, addressable-2.8.6, matrix-0.4.2, regexp_parser-2.9.0, xpath-3.2.0, base64-0.2.0, rexml-3.2.6, rubyzip-2.3.2, websocket-1.2.10, bigdecimal-3.1.7, drb-2.2.1, mutex_m-0.2.0, rdoc-6.6.3.1, public_suffix-5.0.4, date-3.3.4, net-protocol-0.2.2, psych-5.1.2 in locally installed gems
Run `bundle install` to install missing gems.
the same command runs in the same project when i use the terminal
I've tried using bundle config path vendor/bundle which seems to make RubyMine commands work but that makes the terminal commands not work for some reason.
here is my gem env:
RubyGems Environment:
- RUBYGEMS VERSION: 3.5.7
- RUBY VERSION: 3.2.2 (2023-03-30 patchlevel 53) [x86_64-linux]
- INSTALLATION DIRECTORY: /home/aminkhalsi/.gem
- USER INSTALLATION DIRECTORY: /home/aminkhalsi/.gem/ruby/3.2.0
- RUBY EXECUTABLE: /usr/bin/ruby
- GIT EXECUTABLE: /usr/bin/git
- EXECUTABLE DIRECTORY: /home/aminkhalsi/.gem/bin
- SPEC CACHE DIRECTORY: /home/aminkhalsi/.cache/gem/specs
- SYSTEM CONFIGURATION DIRECTORY: /etc
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-linux
- GEM PATHS:
- /home/aminkhalsi/.gem
- /home/aminkhalsi/.gem/ruby/3.2.0
- /usr/share/gems
- /usr/local/share/gems
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :backtrace => true
- :bulk_threshold => 1000
- "gem" => "--user-install --bindir /home/aminkhalsi/bin"
- REMOTE SOURCES:
- https://rubygems.org/
- SHELL PATH:
- /home/aminkhalsi/.gem/bin
- /home/aminkhalsi/.cargo/bin
- /home/aminkhalsi/.local/bin
- /home/aminkhalsi/bin
- /usr/lib64/ccache
- /usr/local/bin
- /usr/local/sbin
- /usr/bin
- /usr/sbin
- /var/lib/snapd/snap/bin
- /home/aminkhalsi/.local/share/JetBrains/Toolbox/scripts
Thank you in advance for your help!
Please sign in to leave a comment.
Hello,
Sorry to hear about your experience with RubyMine. I've created an issue in our tracker for future investigation. Please upvote it and monitor it for updates.
As a workaround, you can try to use ruby installed with version manager.
Best regards,
Karina Mokleva
The RubyMine team