installation of ruby on rails using railsinstaller for windows - ruby-on-rails

i had downloaded package railsinstaller for windows and had successfully installed it.
After that i followed these steps and got that window of localhost:3000 running successfully.
But now when i again starts it following error(in the image link) comes.
http://tinypic.com/r/11ch4ix/6
what should i do to solve this??
ruby -v command was also applied and everything is installed properly.
Thanks in advance!

Ruby on Rails needs a Javascript runtime installed on your computer.
First you should try putting the ExecJS gem in comment again (in your gemfile.rb).
Else you could install NodeJS, as it contains a Javascript runtime (V8 - used by Chrome).
Good luck!

Related

Rails initialization checksum error

I'm trying to initialize a new rails app on windows, and running rails new <appname> generates everything up to vendor/assets/stylesheets/.keep, but when bundle install is run, rails generates this error:
Checksum of /versions does not match the checksum provided by server! Something is wrong.
I'm not sure what's causing this, as I've done nothing to rails itself. Any help is appreciated.
Edit: If it's an error caused by windows being finicky, I have the option of moving to Linux, but I'd like to know what's wrong first.
I had the same issue using windows, and was able to solve it by uninstalling bundler and installing an older version.
rails new <appname>
gem uninstall bundler
gem install bundler -v 1.9
cd <appname>
bundle install
That did it for me!
In my case there was a *.pre.1 version and I chose to uninstall that particular version and then "bundle install" worked.
Try removing your ruby cache folder and then try again. So for example if you are on Linux machine and you are using rbenv and say ruby 2.1.5 folder. Your path would be similar to something like (Not sure where on windows ruby is stored):
~/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/cache/
Removing this folder and trying bundle install again should resolve the issue.
It will be great, if you move to a Linux machine.
On windows it's a hell to pay in my 5 years of experience what i have learned is not to mess with (ror) or (rs) in windows. here's a cheeky thing you can do an easy way. I believe you are using github as repo, as a editor you are using sublime if thats is a case open your gemfile you will see check the image or
try to clear cache on your server or update the gems.
I had this same exact error and solved it the following way. I think you are missing the ruby DevKit being installed.
Go here http://rubyinstaller.org/downloads/ and download/install the latest 32-bit Ruby version (as of writing this 2.2.4, you will need it for the web-console gem)
Make sure to add your ruby\bin folder to your environmental path variable
The trick is hidden near the bottom-left of the same page under the "Development Kit" section. You need to download and extract the right one into a permanent location (as of writing this for 32-bit - DevKit-mingw64-32-4.7.2-20130224-1151-sfx.exe)
After extracting the files, go into the main directory and run "ruby dk.rb init" followed by "ruby dk.rb install" (More information can be found here
That fixed it for me and i can now fully install with no checksum issues
This problem began when i tried to run my app. I wrote rails s and the console said me Could not find sdoc-0.4.1 in any of the sources Run bundle install to install missing gems. Then i wrote bundle install and the message that appeared was Checksum of /versions does not match the checksum provided by server! Something is wrong.
I solve this problem following this steps:
Wrote bundle install
The console said me Could not find sdoc-0.4.1 in any of the sources
Then i reinstalled this gem with gem install sdoc -v 0.4.1
I tried again to write rails s and it's was solved.
`

How can I uninstall ruby on rails completely on Windows (installed using RailsInstaller)?

I'm a complete beginner to ruby on rails and am just following a tutorial on Skillshare. I installed rails on Windows 7 following the instruction, but have been having issues.
I'd like to uninstall it completely and start fresh.
I saw some posts related to this, but commands like gem uninstall rails don't work because I'm not sure which folder I should be in when I type in that command.
Also, the tutorial is being done in Mac so I'm having trouble following it exactly.
Please let me know if there's a way to uninstall rails (installed using railsinstaller). Thanks a bunch!
You can uninstall it from Program and Features in Control Panel. After that you can remove the directory to which you installed it. If you didn't change it, then it is C:\Program Files(x86)\Railsinstaller
However, refreshing the software installation is just about the extreme step. What issues are you experiencing? You can comment or add those to your questions.

Spree 1.1.0 demo missing product images

I'm on mac osx, rails 3.2.3, ruby 1.9.3-p194, spree 1.1.0, rvm 1.10.2. ImageMagick was installed using homebrew and is on version 6.7.5-7
First I installed spree gem install spree
Then created new rails project rails new mystore
To install spree to my rails app I did cd mystore and then spree install
The site runs fine but I don't see any images when I run the demo site. I also see that the public/spree/products folder is empty.
Any idea why the images were never created during installation?
Turns out that imagemagick wasn't installed properly on my system. You can check this by running identify at the command line. If it errors then imagemagick isn't installed right.
Once I got imagemagick installed properly I re-created the demo project and the images showed up.
It was hard to tell that anything wrong because the spree installation didn't throw any errors. So for anyone that runs into this problem, just check to make sure imagemagick is working.

need help installing ruby on rails

I'm installing 1.87.
I got ruby installed and ruby gems
then I tried this from the command prompt: gem install rails
and it gave me this error: http://screencast.com/t/wmBr2b1vC5I
I got the devkit like it suggested and put it in a directory on my desktop but when I went to github for instructions I got lost.
Can someone help guide me step by step? I'm used to PHP and MySQL using WAMP so running things from the command line is new to me.
A lot of gems require native code to be built and linked to as they're being installed. Unfortunately, Windows does not provide any compiling and linking tools, so you have to take one of several routes to enable building native code in Ruby gems.
I've always used Cygwin in the past to accomplish this, but there's also the Ruby Installer which may benefit you more.
Ruby Installer: http://rubyinstaller.org/
You'll probably need to remove your current Ruby install before running the installer, but it should give you everything you need to make installing Rails possible.
If you don't want to use the full installer, you can download "Development Kit", which is part of the installer, to just add the necessary build tools to your command-line environment.
Development Kit: https://github.com/downloads/oneclick/rubyinstaller/DevKit-tdm-32-4.5.2-20111229-1559-sfx.exe

rails 3.1 not working for Windows 7 (JavaScript Runtime issue)

I searched around, people say it suppose to work that I don't need javascript runtime on Windows, but it's not working. When I run rails server, it tells me I need runtime and show a link to a github page. Also I tried to install those runtime listed on that github page, including therubyracer, nothing is able to be installed, got errors everywhere. The question is, what should I do to get Rails 3.1 running on Windows 7?
Check this answer: therubyracer gem on windows
You should be using execjs gem instead.
From the execjs page: it should just use the standard Windows javasccript runtime (Jscript).
Set the following environment variable:
export EXECJS_RUNTIME=JScript
or
ENV['EXECJS_RUNTIME'] = 'JScript'.
Hope this helps.
I struggled with this for many hours tonight, doing all sorts of stuff with reinstalling ruby, rails, devkit, trying to include therubyracer or libv8... (I'm sure you've come across all of this by now)
I eventually solved it by: Uninstalling Internet Explorer 9.
I'm now back to the default IE8 and it is working fine.
(Windows 7 Ultimate x64, Service Pack 1, running Ruby 1.9.2p290, Rails 3.1.1, Rubygems 1.8.1.1. Also installed the Devkit and node.js at some stage through this)
Have you thought of using vagrant, that way you can have more than one vm you can control and vm for development and their systems are separate from each other so you have less dependency issues.
And also you'll be running linux so everything should be available for that platform.
You need to install node.js to run the coffeescript compilation used in rails. http://nodejs.org/

Resources