I set up a rails project, it all works fine, but I can't get it running through IntelliJ.
I have rails 4.2.6 and ruby 2.2.0 (had 2.3.0 and I've read that it may not be supported by IntelliJ). I'm using vagrant. In my configuration I have:
Ruby SDK: Use other SDK: Remote:ruby-2.2.0-p0 (vagrant:\C:\some-app\usr\local\rvm\rubies\ruby-2.2.0\bin\ruby)
The following commands in vagrant give me:
which ruby -> /usr/local/rvm/rubies/ruby-2.2.0/bin/ruby
which rails -> /usr/local/rvm/gems/ruby-2.2.0/bin/rails
I keep getting the No Rails found in SDK error. How can I solve this? I did not find anything that works for me.
Related
Title kind of explains it. In both the Development Configuration and Preferences -> Languages -> Ruby SDK and Gems settings I have the correct Ruby version/Gemset selected. But it still just saying:
Error running Development: the_factory: [No Rails found in SDK]
I've used RubyMine on tons of projects and this has never given me a problem. But this is a new project, using Rails 5 and Ruby v2.3.0, and I just can't figure out what's going on here.
This is in Ruby SDK and Gems settings in RubyMine 8:
And this is my Development config:
Update
When I run rails server in my project folder, it works as expected.
Ok, so I checked it out a little on RubyMine help page and I found this magical phrase:
RubyMine supports Ruby versions 1.8.6 to 2.2
So I removed my rvm Ruby 2.3 version, installed Ruby 2.2.4, create a gemset with Rails 5. Then I assigned that gemset to my project and Voilá! It worked as expected.
Note: This answer my specific question at the date I write this. But this obviously is not a long term answer, so if you are a future boy/girl with this very same problem, first check if your RubyMine version support Ruby >v2.3 before remove your current Ruby version.
For me the solution was that I had several Rails gem versions installed in my project directory.
gem uninstall rails
was the way to go, removing any unwanted versions. Feels like a contradiction - but uninstalling Rails meant that RubyMine could find Rails.
I've upgraded ruby with homebrew. Current version is 2.2.2. Installed Rails by gem. Version is 4.2.4.
Trying to build an empty rails project RubyMine stops soon saying
Can't run 'rails'. Can't find 'rails'.
I've tried both with RubyMine 7.1 and RubyMine Eap 8.
In the shell, obviously everything works perfectly. I think this happens because RubyMine uses ruby in /usr/local/Cellar/ruby/bin instead of /user/local/bin. I've tried to export "cellar" folder in $PATH, but that doesn't work. Any Ideas?
I think this happens because RubyMine uses ruby in /usr/local/Cellar/ruby/bin instead of /usr/local/bin
That sounds right. Each Ruby install has its own set of (global) gems. Make sure you have rails installed using the Ruby installed by Homebrew (not just the system Ruby).
I downloaded RoR ans installed in on my Windows XP, but anyhow its not working. I am totally new to thie RoR. Please check my following screenshots --
1)This is what i did initially -
2)Started rails server but it wont.
3)Even rails version command is not working.
4)This is what creating in my aap2 folder :(
Please let me know what I am doing wrong.
NOTE -- I installed RoR via rails-installer.exe
Installer info --
You've installed Rails 2.3 but you're expecting it to work like Rails 3.
The correct syntax for Rails 2.3 is:
rails myproject
The correct syntax for Rails 3.x is:
rails new myproject
For both, you probably want to check the version with:
rails -v
Rails 2.3 is no longer actively supported so you should not be creating new projects with it.
I just installed Eclipse, then Ruby 1.9.2 then RailsInstaller. I then installed Aptana plugin for eclipse.
My directory setup are as follows:
C:\Ruby192
C:\RailsInstaller\Ruby1.8.7
When I create a new rails project in Eclipse, It throws this error:
LOL#LOL-PC /d/Projects/rail
$ rails .
sh.exe": rails: command not found
I found this solution, but it seems its for linux. I'm using Windows 7.
I reinstalled rails and ruby but its the same thing. I also had installed GitBash and GitExtensions a few months ago and had this problem. I solved it by pointing to the directory where Git was and setting the Default environment to HOME.
I now have no idea what to do to use ruby on rails in this error.
Add the place where you installed rails to your PATH environment variable. (Presumably C:\Ruby192\lib\ruby\gems\1.9.1\gems\rails*\bin)
I also noticed you are using the RailsInstaller for ruby 1.8.7 but seem to have installed ruby 1.9.2. This may cause trouble in the future.
Try following this guide for installing rails on windows. It uses gem install instead of the out dated RailsInstaller.
i've upgraded to rubymine 3.1 and now rubymine take all project as rails 3 project, but the mine are not. Does anybody of you face this problem. Ruby mine fires up this message, when i try to run application
Run configuration error: Rails 2.x launcher found instead of Rails 3.x one. You need '/script/rails'
script to launch Rails server. Please update server launcher according to Rails 3.x documentation
My final state is i can run rails 2.x app server from rubymine
Do you know how to achieve that?
I had this problem using Rails 2.3 and RubyMine 3.1 -- my solution was to look at the project settings (File -> Settings) and select Ruby SDK and Gems. Look through your attached rails gems. I had both rails 2.x and rails 3.x gems attached to my project.