Ruby Interpreter(CUI) 2.2.4p230 [i386-mingw32] has stopped working - ruby-on-rails

My command prompt keeps bringing up Ruby Interpreter(CUI) 2.2.4p230 [i386-mingw32] has stopped working this message when I try to access all my ruby projects. I'm currently using ruby version 2.2.4, rails version 5.0.0 and windows version 10 (recently updated to windows 10 from 8.1). On my git bash every thing seems to work fine,I don't know what went wrong to my command prompt.
Relevant Things :
I used railsinstaller to install my ruby, recently updated to windows 10 and recently tried to install ANSICON but it failed somehow.

Related

Rails installation isn't permanent on Ubuntu Bash for Windows 10, how can I fix this?

I recently started testing out the Ubuntu bash for Windows 10 sub-system for my Ruby and Rails work. To set up rails, I followed this guide from GoRails.com.
Everything worked yesterday. But after shutting down my PC and starting up the Ubuntu bash terminal again today, it doesn't seem to recognize ruby or rails anymore. i.e. typing ruby -v gives me this:
The program 'ruby' is currently not installed. You can install it by typing:
sudo apt install ruby
Typing rails -v gives me:
bash: /mnt/c/Ruby22-x64/bin/rails: ruby: bad interpreter: No such file or directory
For reference, I used the instructions from the above guide to install Ruby 2.4.0 using RVM and Rails 5.1.1. When I ran ruby -v and rails -v yesterday, everything worked fine.
I should note, that before testing out the Ubuntu sub-system, I've been using Ruby and Rails on Windows itself - In this case, I have Ruby 2.2.5 (64-bit) installed using an installer downloaded from here. I installed Rails on Windows by running gem install rails on the Windows command prompt.
I am on Windows 10 Home Version 1703 (OS Build 15063.483)
from your story above, probably how you start the terminal (command prompt)
if you run using go rails make sure your run the terminal with bash, press start, then search for bash then you click bash icon
if you using ruby from ruby installer / rails installer you search "command prompt with ruby and rails" and click the icon
Firstly install ruby using rvm manager. It enables you to switch between different ruby versions as per your project.
Follow the instructions on this website:
http://rvm.io/rvm/install
and install ruby through rvm.
For the problem of unable to detect ruby on your system change settings for your terminal through Edit->preferences/profile preferences -> command ->(tick mark) run command as login shell.

Updating Ruby version on Windows 7

I'm trying to deploy a Rails (4.2.6) application on a Windows 7 system (customer requirement).
I installed rubystack-2.2.5-3 and this comes with Ruby 2.2.0, but my app was developed using Ruby 2.3.1. I started thin server as explained in the deploy instructions and then tried to run my app, but got an error "Method does not exist" and as it is running perfectly in my Linux box, I assumed that it is because of the Ruby version.
I can't install RVM or RBENV on Windows, right? So I researched Google and saw there was a Ruby 2.3.0 installer. I downloaded it and installed it. Then I updated the PATH variable to point to my new Ruby installation. But when I do a bundle install it still complains that my Ruby version in Gemfile (2.3.0) is different from my installed Ruby.
How can I tell it to run the new Ruby?
Am I doing something wrong?

Rubymine can't find Rails on osx

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).

Mac OSx Lion - Cannot get RoR installed

I recently upgraded to Lion and I am trying to install Rails. I used RubyGems to install rails and each time I tried to start a new rails project I would get an error saying, "Method 'list ' was not found".
So I unistalled Rails using RubyGems. I noticed I had two versions installed. I uninstalled both. I then ran 'gem clean'. Once again I installed Rails but now when I attempt to create a new rails application it's as if rails is not installed.
rails: command not found
I have the new Xcode command line tools installed. Can anyone help a brother out?
I believe my issue is due to the fact RubyGem does not add 'rails' to the $PATH environment variable. I was able to get everything working by installing RVM and using it to update my default Ruby and install Rails

rails is not found when trying to start a new rails project

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.

Resources