Hi,
I have installed Ruby 1.8.4 and Ruby Gems 0.9.0.
I have also downloaded rails-1.1.6 zip file and extracted it to a
folder, say “rails”.
When I am trying to run the rails, by using the command “ruby
script/server” from “rails” folder, I get following error, which shows
syntax error on line 8 of config/environment.rb. If I comment, this
line, then the WEBrick server starts up properly.
Any idea what might be going wrong?
====================START OF ERROR =================
d:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
gem_original_require': ./script/../config/../config/environment.rb:8: syntax error (SyntaxError) <%= '# ' if freeze %>RAILS_GEM_VERSION = '<%= Rails::VERSION::STRING %>' ^ from d:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
require’
from
./script/…/config/…/vendor/rails/activesupport/lib/active_support/dependencies.rb:147:in
require' from ./script/../config/../vendor/rails/railties/lib/commands/servers/webrick.rb:52 from d:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
require’
from
./script/…/config/…/vendor/rails/activesupport/lib/active_support/dependencies.rb:147:in
require' from ./script/../config/../vendor/rails/railties/lib/commands/server.rb:30 from d:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
require’
from script/server:3
====================END OF ERROR =================
Whats the line 8 ?
On 8/19/06, Srikanth [email protected] wrote:
from
from
–
rm -rf / 2>/dev/null - http://null.in
Dont judge those who try and fail, judge those who fail to try…
Pratik Naik wrote:
Whats the line 8 ?
On 8/19/06, Srikanth [email protected] wrote:
from
from
–
rm -rf / 2>/dev/null - http://null.in
Dont judge those who try and fail, judge those who fail to try…
Line 8 is :
<%= '# ’ if freeze %>RAILS_GEM_VERSION = ‘<%= Rails::VERSION::STRING %>’
As shown in error message in original post, the ruby interpreter is
complaining at <% in the beginning of line.
Srikanth wrote:
Hi,
I have installed Ruby 1.8.4 and Ruby Gems 0.9.0.
I have also downloaded rails-1.1.6 zip file and extracted it to a
folder, say “rails”.
When I am trying to run the rails, by using the command “ruby
script/server” from “rails” folder, I get following error, which shows
syntax error on line 8 of config/environment.rb. If I comment, this
line, then the WEBrick server starts up properly.
Any idea what might be going wrong?
You shouldn’t download rails zip file directly but rather use:
gem install rails -y
instead.
Rails is not an instance of application (like it works with php
applications for example.) It is framework which GENERATES applications.
You have to install Rails (preferably using gems as described above)
than use Rails to generate example application and then start this
application. You can not start Rails themselves - and that is why gives
you an error.
Google for Windows Rails installation tutorials to find out more.
Cheers,
Bragi
Just write :
RAILS_GEM_VERSION = ‘1.1.8’
Or comment it if you’re using edge rails. This is needed when you have
multiple rails gem installed.
-Pratik
On 8/19/06, Srikanth S. [email protected]
wrote:
As shown in error message in original post, the ruby interpreter is
complaining at <% in the beginning of line.
–
Posted via http://www.ruby-forum.com/.
–
rm -rf / 2>/dev/null - http://null.in
Dont judge those who try and fail, judge those who fail to try…
Was this issue ever solved? I am getting a similiar error.
On Aug 19, 9:42 am, “Lukasz Piestrzeniewicz”
Well, I installed the rails using command “gem install rails
–include-dependencies” and then, created the new application using
“rails myapp”. I did not face this problem for “myapp”.
I am not quite sure how to use the zip version of rails. Rails when
installed using “gem” works alright. The reason I tried the zip file
version of Rails in first place was because I did not how to make the
“gem install” work on a office PC which had internet proxy configured.
It seems to work fine from my home PC.
[email protected] wrote:
Was this issue ever solved? I am getting a similiar error.
On Aug 19, 9:42 am, “Lukasz Piestrzeniewicz”