I just followed every step for installing ruby on rails as it says here http://rubyonrails.org/download but i can't create succesfully a rails project. This is exactly what I did:
Installed ruby with windows installer v2.0.0-p0 x64 (I'm running W8 pro)
Installed RubyGems with the following procedure:
Downloaded thee .zip file from the webpage
Unzipped the folder into the Ruby200-x64 folder in C:
Excecuted the "setup.rb" file
Installed Rails with the following procedure:
Opened a CMD and put gem install rails
But when I try to "create the application skeleton" through the command
rails new C:\Users\Andrés\Desktop\Mediplan
I get the following:
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.12/lib/rails/generators/app_base-rb:100:in 'expand_path' : incompatible character encodings: CP850 and UTF-8 <Encoding::CompatibilityError>
Anybody knows a fix for this?
(Let me know if additional information is needed)
Could be due to the é in Andrés. Try changing your path to the Desktop first, then create the Rails app. Try this:
cd C:\Users\Andrés\Desktop
rails new Mediplan
Related
Trying to teach myself Ruby and using the Book Apress Beginning Ruby. I bought TextMate 2 and in the very beginning of Chap. 4 I am being asked for following:
Launch Terminal (Completed)
Use cd to navigate to the folder where you placed example1.rb, like so:cd ~/ruby. This tells Terminal to take you to the ruby folder located off of your home user folder. (Can't figure this out. What is "cd". Where do I type this TextMate 2 or Terminal. Do I type irb prior? I saved the example1.rb on my desktop, tried to drag and drop, says permission denied).
Type ruby example1.rb and press Enter to execute the example1.rb Ruby script.
If you get an error such as ruby:No such file or directory -- example1.rb (LoadError), you aren’t in the same folder as the example1.rb source file, and you need to establish where you have saved it. (Obviously I get this error, but I can't complete step 2).
Was super excited getting through chap 1-3 and using irb and now I bought TextMate2 and I get stuck trying to start my first ruby app.
Can anyone help explain Step 2 so I can complete 3 and 4?
What is "cd"
cd is change directory command. Type it in your terminal like this:
cd /dir/that/has/example1.rb
If example1.rb is in your Desktop and you are using Mac and your username is tom, then cd command would be:
cd /Users/tom/Desktop
Then from the terminal again, type:
ruby example1.rb
to run your Ruby script.
I'm trying to install Ruby on Rails on Windows 7 but I have a problem immediately at the beginning of the configuration. This is the first time I'm trying RoR.
I downloaded RailsInsaller from http://railsinstaller.org/ and installed it successfully. Immediately after the installation when I need to configure environment, I receive an error in cmd:
# Rails Environment Configuration.
open C:\\Users\\\246ero/.ssh/id_rsa failed: No such file or directory.
The system cannot find the path specified.
D:/ROR/RailsInstaller/scripts/config_check.rb:87:in `initialize': No such file o
r directory - C:\Users\|ero/.ssh/id_rsa.pub (Errno::ENOENT)
from D:/ROR/RailsInstaller/scripts/config_check.rb:87:in `open'
from D:/ROR/RailsInstaller/scripts/config_check.rb:87:in `<main>'
What is the solution to this problem? Or is there any other way to install RoR on Windows 7? Thank you for your help.
I know it's an old post, but I had the same issue, and I think I've found the solution.
The path that ssh is trying to access contains that character "|" that Ruby doesn't like, that's because your username is "|ero".
To resolve this issue, you should either change your windows username (this should prevent you from a lot of troubles in your future setup), or change your HOME environment variable so that it points to a folder that doesn't contain any accent, space or strange character in its path ! And then re-install Ruby :)
Hope it helps!
I have installed Ruby on Rails in Windows 7. To install ruby on rails on Windows7 follow the steps:
1) install ruby on windows 7. Download from: http://rubyinstaller.org/
2) check ruby is installed correctly by this command ruby -v if this gives command not found error, then set RUBY_HOME="path/to/ruby/bin" in environment variables.
3) install rails by command gem install rails.
and you are done. Enjoy Ruby On Rails on Windows7.
I faced exactly the same problem and found its solution - under Windows XP Pro SP3. You should manually generate the ssh keys pair. Run ssh-keygen from a bash
shell so it generated both id_rsa and id_rsa.pub.
That's easy as 3 mouseclicks:
Start - Programs - Rails Installer - Git Bash
type there "ssh-keygen". Press Enter 2 or 3 times. You're done! The problem is gone now.
I installed ruby 1.9.3 w/ rubyinstaller-1.9.3-p194.exe, and then installed RubyMine right after, as per directions:
http://www.jetbrains.com/ruby/quickstart/index.html
and
http://rubyinstaller.org/
I have git hub for windows already installed which I don't know if that could cause the problem.
I have also installed ruby and rails several times but I looked through the PATH environment variable for any no longer existing installations and removed them (after having already had this error) which didn't help.
Here are the settings I select in RubyMine.
The error message:
"C:\Ruby193\bin\ruby.exe -e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) C:\Ruby193\bin/rails 3.2.6 new "D:/Program Files (x86)/Git/Rails App/asfasf" --skip-test-unit --javascript=jquery --skip --database=postgresql
exist D:/Program Files (x86)/Git/Rails App/asfasf
Could not find "README" in any of your source paths. Your current source paths are:
C:/Ruby193/lib/ruby/gems/1.9.1/gems/railties-3.2.6/lib/rails/generators/rails/app/templates
Process finished with exit code 1"
I apologize if I come across as angry / frustrated (I edited this several times to remove it) as I have been trying to get RubyMine to work on Windows 7 or Ubuntu 12.04 and neither have been successful.
Any advice would be greatly appreciated!
I continued searching through the web for information and remembered somewhere installing rails on windows previously that for some reasons files couldn't have spaces in them.
Long story short: make sure your path doesn't have spaces in the name because it breaks rubymine or rails or something along the way.
Changing my project folder to a destination with no spaces solved the problem.
I'm just starting out with rails and I'm practicing the basic ruby commands, one of which is the rails new myproject command.
My projects are under the Aptana workspace directory where I've used the command line and Aptana both to create projects there. After a few creations and rails s commands and deletions, I've started getting this error message when I try to generate a new rails project:
"Can't initialize a new Rails application within the directory of
another, please Type 'rails' for help."
This doesn't just happen when I create a new project (rails new myproject) under the Aptana workspace directory, but also when I use the command rails new . directly inside the workspace directory. Can someone explain to me what I need to do to flush rails so it knows I don't have a project there anymore? What did I do to make this happen?
I don't remember what rails looking for. The quickest way to solve this issue is to completely empty the affected directory.
Most likely there are some hidden files or directories which prevents rails from creating a new project. Look at that with ls -a probably there is a .bundle folder inside that dir.
I got same problem since I failed to create rails project. I tried to remove Aptana plug-in and Eclipe that include ./eclipse, ./metadata but not sloved the problem until I removed Ruby and Devkit and reinstall them again.
So, I think the root cause may in Devkit or Ruby. The problem work out after I reinstall Ruby(rubyinstaller-2.2.3-x64.exe) and DevKit(DevKit-mingw64-64-4.7.2-20130224-1432-sfx.exe).
If you are under Windows, you must install Aptana Studio as administrator or it will not work properly. Uninstall and install it as administrator and the terminal folder will be set correctly
I just installed ruby on rails on my new computer ( I was using instantrails before) and I'm trying to get everything setup.
Im running Windows 7. So I followed the instructions from this tutorial.
http://blogupstairs.com/ruby-on-rails/installing-ruby-on-rails-on-windows-7/
The problem i'm guessing is step 3
"Add the newly installed bin directory to your path in your windows system : Open windows explorer-> right click the icon computer-> choose Properties -> in the contol panel Home, Click Advanced system settings and then click Envitonment Variables button->in the system variables click new and add new system variables like this : Variable name : RUBY_HOME , Variable Value : C:\Ruby, after that add it in to the path and add the bin after a semicolon to the “Path” variable like this : C:\Program Files\Common Files\Adobe\AGL;%JAVA_HOME%\bin;%ANDROID_HOME%\tools;%RUBY_HOME%\bin"
I set created the system variables but when I try to run script/generate in the main directory of my app I get the error
"Ruby: no such file or directory --script/generate"
I checked the apps directory and the script folder is in there. How can I run the "ruby script/generate" commands from the control panel?
I was guessing it was something with the path but I dont know any ways to check to find out whats going wrong.
Are you using Rails 3.0+? In this version of rails and up, the script/* folder has been deprecated in favor of rails generate, rails server, etc. See here.
In 99.99999% of all cases, if a computer tells you that it cannot find a file at a specific location, it is because that file is not at that specific location.
So, is there actually a file named generate in a directory named script in the current directory?
I have recently installed RoR on my "clean" Win7 as well.
What IDE are you using?
I suggest trying JRuby with NetBeans/RubyMine:
JRuby installer does all the work (even adds the proper variables to your path in system environment settings...,
IDEs take care of gems, setting up servers etc.
As for the commands, as Nuclearsandwitch mentioned, there is no script/generate or script/server in Rails 3. Just make sure you in the directory with your Rails app and then try running rails server. It should work :-)