ERB VS rhtml

I have the addison wesley RailsSpace book to learn Ruby on Rails,and
I am wondering why my version of ruby uses and crestes .erb files rather
than rhtml files. It is making it very difficult to follow the book as
some examples dont work correctly or as they should in the book. What
changes do I need to make in order to use my version of Ruby with this
book?
My version is ruby -v 1.8.6 (2007-09-24 patchlevel 111) [x86_64-linux]

It’s not the version of ruby that’s the issue, it’s the version of
rails. See:

http://railsspace.com/

For instructions on installing a railsspace-compatible version of rails.

HTH,

-Roy

Thanks for the quick reply , but this seems to have failed for some
reason
sudo gem install rails -v 1.2.3 --include-dependencies
[sudo] password for baxter:
INFO: gem install -y is now default and will be removed
INFO: use --ignore-dependencies to install only the gems you list
Updating metadata for 24 gems from http://gems.rubyforge.org/

complete
ERROR: could not find rails locally or in a repository

Roy P. wrote:

It’s not the version of ruby that’s the issue, it’s the version of
rails. See:

http://railsspace.com/

For instructions on installing a railsspace-compatible version of rails.

HTH,

-Roy

Is this an issue with repos, ergo do I need to use older repos?

I guess to be more specific
I am running Ubuntu 8.01 x86_64
ruby -v 1.8.6 (2007-09-24 patchlevel 111) [x86_64-linux]
rails 2.02
and want to roll back to rails 1.2.3
I am now looking for a manual safe way to do this.

Not sure, tho I tend to doubt it. I would try uninstalling rails and
then just doing an install of the desired version.

HTH,

-Roy

OP,

do you mean that it’s creating .erb.html files instead of .rhtml files?

Also, to install an older version of rails the correct syntax is:

gem install rails -v=1.2.3

You don’t need to specify the include-dependencies option unless you’re
using a rubygems version < 1.0.1

On 5/12/08, Ryan B. (Radar) [email protected] wrote:

Also, to install an older version of rails the correct syntax is:

gem install rails -v=1.2.3

You don’t need to specify the include-dependencies option unless you’re
using a rubygems version < 1.0.1

Which likely includes anyone who got it from a Linux distro.

Ubuntu Hardy for example ships with:

gem --version
0.9.4

And here I thought I was using a cutting edge distro. :frowning:


Greg D.
http://destiney.com/

Greg D. wrote:

On 5/12/08, Ryan B. (Radar) [email protected] wrote:

Also, to install an older version of rails the correct syntax is:

gem install rails -v=1.2.3

You don’t need to specify the include-dependencies option unless you’re
using a rubygems version < 1.0.1

Which likely includes anyone who got it from a Linux distro.

Ubuntu Hardy for example ships with:

gem --version
0.9.4

And here I thought I was using a cutting edge distro. :frowning:


Greg D.
http://destiney.com/
Yeah I am using Ubuntu 8 XX something
I just installed it fresh for the sole purpose of runnig Ruby onRails
because there seemed to be a lot more support pages for installation on
Ubuntu
This is my whole problem .
I am using a book called RailsSpace which is designed to teach users how
to use Ruby on Rails by creating a RailsSpace, (kinda like a real
simple myspace)
My problem is that it uses 1.2.3 and when I run commands like
ruby script/generate controller Site index about help
I dont get rhtml files , I get erb files instead, which work but makes
things
a little more confusing.
I found a site on RailsSpace where I could download all the files for
the book in one zip , which were supposed to work with Rails 2.0
but they still dont. For instance if I create my railspace
(I call mine baxterspace)
“rails baxterspace” for example , and then copy all their files into
that directory (with updating the databases.yml file _)
I get this error
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in
gem_original_require': no such file to load -- acts_as_ferret (MissingSourceFile) from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:inrequire’
from
/home/baxter/baxterspace/vendor/rails/activesupport/lib/active_support/dependencies.rb:496:in
require' from /home/baxter/baxterspace/vendor/rails/activesupport/lib/active_support/dependencies.rb:342:innew_constants_in’
from
/home/baxter/baxterspace/vendor/rails/activesupport/lib/active_support/dependencies.rb:496:in
require' from /home/baxter/baxterspace/config/environment.rb:61 from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:ingem_original_require’
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in
require' from /home/baxter/baxterspace/vendor/rails/activesupport/lib/active_support/dependencies.rb:496:inrequire’
… 7 levels…
from
/home/baxter/baxterspace/vendor/rails/activesupport/lib/active_support/dependencies.rb:496:in
require' from /home/baxter/baxterspace/vendor/rails/railties/lib/commands/server.rb:39 from script/server:3:inrequire’
from script/server:3

Let me show you what exactly I am trying to load into Rails . I
So you see what I am trying to do
here is a link , its too large to attach
http://railsspace.com/book

.erb.html is the new naming schema for .rhtml, and it’s because you’re
using
Rails 2.0. There is no difference between the content of these files.

Ryan B. wrote:

.erb.html is the new naming schema for .rhtml, and it’s because you’re
using
Rails 2.0. There is no difference between the content of these files.

yes,this is what I assumed, … but I am wondering to I have to do a
batch file conversion to rename all the .rhtml files to erb?

Also the above errors I listed occur when using the books finished
example on 2.0

If you look at the error you posted - the complaint is that your install
lacks acts_as_ferret - that is the search plugin that RailsSpace uses
late
in the book.

`gem_original_require’: no such file to load – acts_as_ferret

sudo gem install acts_as_ferret

Should get rid of that error.


Cynthia K.
[email protected]

I’m not too sure on the batch renaming of the files, sorry.

You could probably write a Ruby script.

On Tue, May 13, 2008 at 8:09 AM, Baxter Baxter <
[email protected]> wrote:

example on 2.0

Posted via http://www.ruby-forum.com/.


Ryan B.
http://www.frozenplague.net
Feel free to add me to MSN and/or GTalk as this email.

Cynthia K. wrote:

If you look at the error you posted - the complaint is that your install
lacks acts_as_ferret - that is the search plugin that RailsSpace uses
late
in the book.

`gem_original_require’: no such file to load – acts_as_ferret

sudo gem install acts_as_ferret

Should get rid of that error.


Cynthia K.
[email protected]

Thank you I will try that.

Cynthia K. wrote:

If you look at the error you posted - the complaint is that your install
lacks acts_as_ferret - that is the search plugin that RailsSpace uses
late
in the book.

`gem_original_require’: no such file to load – acts_as_ferret

sudo gem install acts_as_ferret

Should get rid of that error.


Cynthia K.
[email protected]

Now I am getting this
sudo gem install acts_as_ferret
[sudo] password for baxter:
/usr/bin/gem:23: uninitialized constant Gem::GemRunner (NameError)

Your rubygems is still referencing the older version.

http://frozenplague.net/2008/04/03/unintialized-constant-gemgemrunner/

On Tue, May 13, 2008 at 10:42 AM, Baxter Baxter <
[email protected]> wrote:

/usr/bin/gem:23: uninitialized constant Gem::GemRunner (NameError)

Posted via http://www.ruby-forum.com/.


Ryan B.
http://www.frozenplague.net
Feel free to add me to MSN and/or GTalk as this email.

Ryan B. wrote:

Your rubygems is still referencing the older version.

http://frozenplague.net/2008/04/03/unintialized-constant-gemgemrunner/

On Tue, May 13, 2008 at 10:42 AM, Baxter Baxter <
[email protected]> wrote:

/usr/bin/gem:23: uninitialized constant Gem::GemRunner (NameError)

Posted via http://www.ruby-forum.com/.


Ryan B.
http://www.frozenplague.net
Feel free to add me to MSN and/or GTalk as this email.

Yeah I see that now , must have happened when I tried to go back to
1.2.3 and just never noticed until now.I was able to install ferret
after this , with gem update ferret, but now I am still getting this
when I start webrick
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in
gem_original_require': no such file to load -- acts_as_ferret (MissingSourceFile) from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:inrequire’
from
/home/baxter/baxterspace/vendor/rails/activesupport/lib/active_support/dependencies.rb:496:in
require' from /home/baxter/baxterspace/vendor/rails/activesupport/lib/active_support/dependencies.rb:342:innew_constants_in’
from
/home/baxter/baxterspace/vendor/rails/activesupport/lib/active_support/dependencies.rb:496:in
require' from /home/baxter/baxterspace/config/environment.rb:61 from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:ingem_original_require’
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in
require' from /home/baxter/baxterspace/vendor/rails/activesupport/lib/active_support/dependencies.rb:496:inrequire’
… 7 levels…
from
/home/baxter/baxterspace/vendor/rails/activesupport/lib/active_support/dependencies.rb:496:in
require' from /home/baxter/baxterspace/vendor/rails/railties/lib/commands/server.rb:39 from script/server:3:inrequire’
from script/server:3

note I have also tried to upload this Railspace 2.0 to my webhosted
webserver which is running rails 2.0 and it fails to start as well.so
its got to be something within the RailsSpace code.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs