Ruby on rails installer issue in windows 7 pc - ruby

I just have installed in my windows machine form railsinstaller.org.
Now earlier I have already installed in my machine Ruby2.0. So when I am trying to run the below command from the command prompt as mentioned here:
rails s
getting error as :
C:/Ruby200/lib/ruby/2.0.0/rubygems/dependency.rb:296:in `to_specs': Could not f
nd 'railties' (>= 0) among 8 total gem(s) (Gem::LoadError)
from C:/Ruby200/lib/ruby/2.0.0/rubygems/dependency.rb:307:in `to_spec'
from C:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_gem.rb:47:in `g
m'
from C:/RailsInstaller/Ruby1.9.3/bin/rails:22:in `<main>'
Now if I uninstall the Ruby2.0 things are set. But I want also to be workable in my pc the latest version of Ruby,so that I can run my practice ruby programs as I could earlier. - Please instruct me ,so that I can run my Rails and only ruby programs from my Sublime Text 2 editor without impact.

Try using the installer from this site: http://rubyinstaller.org/
After it installs, install ruby by opening the command prompt and typing:
gem install rails
that should install rails and its dependancies. From there you can just run the rails command and create projects like usual.

Perhaps you should have a look at https://github.com/vertiginous/pik/ to manage different ruby versions. I think, that the main problem you got is simply, that the PATH-settings for both rails versions (1.9.3 used in railsinstaller and 2.0) are interfering.

Related

Installing Ruby version 2.2.4 on Windows 7

I had an old version of Ruby (1.9.3) that I am using with Selenium Webdriver.But I was getting errors while running my script.So I downloaded Ruby installer 2.2.4 version and ran it. Can someone tell me what is the command line steps to fully install it ? I tried "gem update --system" and I get the error "error fetching data". I tried "gem install ruby" and it says "successfully installed rubyzip 1.1.7"
Installing Ruby on Windows is best done by downloading the installer from the Ruby Installer site and executing the binary. There are a few things to look out for:
Make sure the correct Ruby is in your PATH. E.g.:
echo %PATH%
should include a string like C:\Ruby200\bin. The installation path may be different for your version of Ruby. If you are installing a new version, you might need to edit the path using the Windows dialog so that new sessions include it.
Also, read the instructions for installing the Ruby DevKit. You'll need it for installation of gems with native extensions.
Once Ruby is installed correctly you should be able to run ruby -v in a command window to see that the expected version is there.
\

Apache/Ruby/Passenger misconfigured after Ubuntu 12.04 to 14.04 update

Well, I have to admit, that I'm down today. I've updated my Ubuntu and that rendered Redmine 2.1.2 completely dead. Any suggestions as of to what should I update or reconfigure? I'm trying not to use Ruby/Rails/Passenger blindly but it's tough as it's not my expertise. I'd like to USE Redmine instead.
Top of the Passenger error log is below, but feel free to check whole page at http://redmine.teacloud.net:
It looks like Bundler could not find a gem. Maybe you didn't install all the gems that this application needs. To install your gems, please run:
bundle install
If that didn't work, then the problem is probably caused by your application being run under a different environment than it's supposed to. Please check the following:
Is this app supposed to be run as the nobody user?
Is this app being run on the correct Ruby interpreter? Below you will see which Ruby interpreter Phusion Passenger attempted to use.
-------- The exception is as follows: -------
Could not find rake-10.3.2 in any of the sources (Bundler::GemNotFound)
/var/lib/gems/1.8/gems/bundler-1.3.4/lib/bundler/spec_set.rb:92:in `block in materialize'
• I have no idea, what user should this app supposed to be run as. Everything else uses www-data by default, however the redmine application folder in filesystem is owner by root.
• Everything was working for two years on ruby 1.8 that is not on my system now. I've managed to install lowest version 1.8.7, latest 2.1.2... and I have no idea where does the 1.9.1 get from.
• I don't understand how 'bundle install' and 'bundle update' is related to current ruby version switched to using rvm.
• I am not sure, at what point will my Redmine MySQL database be migrated or destroyed if I'll need to upgrade Redmine (so I have backup).
• bundle install didn't help, Apache runs ruby 1.9.1
Solution was simply as follows (whole failure path is documented here http://www.redmine.orgenter code here/boards/2/topics/43500?r=43514):
• Everything happens in the Redmine's installation folder:
• Went to GitHub (https://github.com/redmine/redmine/blob/master/Gemfile) and copied fresh database section to Redmine's Gemfile (ignoring the fact that I have Redmine 2.1.2 and Gemfile is far newer)
$ rvm use system
$ bundle install

Rails server command generates error report

When I used rails server command, found following errors in terminal. It shows that "could not find a JavaScript runtime". I am newbie in ROR and don't know to configure different files. I Google and found solutions of this problem 1 2 3. Still I am not getting the things. Please suggest some solutions.
Ruby and Rail versions on my system
Ruby version:- ruby 1.8.7 , Rails version:- Rails 3.2.6
I suppose you lack executable on your system/
Haven't you try to run gem install execjs or bundle install(from your project directory) in console?
UPDATE
Also visit execjs homepage and try instaling any of JS runtimes supported.
UPDATE 2
I was able to reproduce your error (with ruby 1.9.2). Just add gem 'therubyracer' to your Gemfile and run bundle install. For some weird reason ROR is not working out of the box on Ubuntu. See this and search for runtime word for more info.
PS
Please put your Gemfile here. This might help.
The error message also tells your to
See https://github.com/sstephenson/execjs for a list of available runtimes.
You have to install one of the JavaScript runtimes listed there:
therubyracer
therubyrhino
Node.js
Microsoft Windows Script Host
For Rails 3.2.6 I suggest to use Ruby 1.9.3. for better performance.

Ruby on Windows7 - could not find gem

I'm setting up a ruby Apache Buildr on a fresh Windows 7 machine.
I've installed Ruby, the DevKit and installed buildr via
gem install buildr
wich all ran perfect.
Until I tried to execute buildr, then I get an error.
buildr compile
C:/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:247:in `to_specs': Could not find buildr (>= 0) amongst [atoulme-Antwrap-0.7.1, builder-2.1.2, buildr-1.4.5-x86-mswin32, buildr-as3-0.2.12, diff-lcs-1.1.2,highline-1.5.1, hoe-2.3.3, json_pure-1.4.3, minitar-0.5.3, minitest-1.6.0, net-sftp-2.0.4, net-ssh-2.0.23, rake-0.8.7, rdoc-2.5.8, rjb-1.3.2-x86-mswin32-60, rspec-2.1.0, rspec-core-2.1.0,rspec-expectations-2.1.0, rspec-mocks-2.1.0, rubyforge-2.0.3, rubygems-update-1.8.4, rubyzip-0.9.4, xml-simple-1.0.12] (Gem::LoadError)
from C:/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:256:in `to_spec'
from C:/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems.rb:1182:in `gem'
from C:/Ruby192/bin/buildr:18:in `<main>'
When I list all the gems with
gem list buildr
Everything seems to match up, and this error makes no sense at all.
Any ideas?
Help would be great, I'm getting desperate now. :)
Had the same problem. I have Windows 7 x64 so installed again with gem install buildr --platform mswin64 and it worked.
I had a similar problem in the past.
My problem was the kind of installation.
I installed ruby as admin (target was c:\program files). Everything worked fine - until I installed a gem as normal user (not admin).
What happened on windows side? I have no authorization for c:\program files, the gem was installed in another directory (No, there was no error, Windows just decided to use another directory. This bug/feature is called 'Virtual Store').
In the end Ruby had problems to find the files.
My solution:
Install ruby as normal user outside c:\program files.
Maybe it is enough, when you install your gems as admin (but attention: if you have once files in your Virtual store, they are read always first.).
Installed Ruby 1.8.7 instead and it works now.

Ruby Gems on Windows

I have removed and reinstalled ruby on my machine (windows 7, ruby 1.9.1). When I go to get rails again I get: While executing gem... File Exists C:
Yet when I list my gems is says none are installed.
What gives?
This is a permissions issue. On Windows, you need to run as admin when you're installing gems.

Resources