Trouble with new app in rails

Hi,

I’ve just installed the latest gem version and also rails. Everything
went ok. I am using Ubuntu 11.10 with ruby 1.9.3-p194.

However, when I try to create a new application, I get:


/usr/local/lib/site_ruby/1.8/rubygems/dependency.rb:247:in to_specs': Could not find railties (>= 0) amongst [] (Gem::LoadError) from /usr/local/lib/site_ruby/1.8/rubygems/dependency.rb:256:into_spec’
from /usr/local/lib/site_ruby/1.8/rubygems.rb:1231:in `gem’
from /usr/local/bin/rails:18

when I want to get the rails version I also get this:

/usr/local/lib/site_ruby/1.8/rubygems/dependency.rb:247:in to_specs': Could not find railties (>= 0) amongst [] (Gem::LoadError) from /usr/local/lib/site_ruby/1.8/rubygems/dependency.rb:256:into_spec’
from /usr/local/lib/site_ruby/1.8/rubygems.rb:1231:in `gem’
from /usr/local/bin/rails:18

regards,
seba

It seems that you still using ruby 1.8.

Try :

*ruby -v *

And show me the output. If it’s not ruby 1.9.3-p194, just install this
version of ruby

*rvm install 1.9.3-p194 *( if you are using ‘rvm’ as ruby management
tool )

Keep me posted

:wink:

2012/7/23 Sebastjan H. [email protected]

from /usr/local/lib/site_ruby/1.8/rubygems/dependency.rb:256:in
from /usr/local/lib/site_ruby/1.8/rubygems/dependency.rb:256:in


You received this message because you are subscribed to the Google G.
“Ruby on Rails: Talk” group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit https://groups.google.com/groups/opt_out.

lionel Bastian LONKAP TSAMBA
tudiant 4e anne Gnie Informatique et Statistiques Polytech-lille

Site: http://first-developer.fr

Email: [email protected]

Tel: +336 12 48 03 01

lionel Bastian LONKAP TSAMBA

Fourth year student in Software Engineering and Statistics

at the Lille University Graduate School of Engineers (Polytech-Lille)

Site: http://first-developer.fr

Email: [email protected]

Phone: +336 12 48 03 01

lionel first-developer wrote in post #1069751:

It seems that you still using ruby 1.8.

I thought so too, however, ruby -v gives:

ruby 1.9.3p194 (2012-04-20 revision 35410) [i686-linux]

regards,
seba

On 23 July 2012 10:29, Sebastjan H. [email protected] wrote:

regards,
seba

how would I check for and completely remove version 1.8?

I strongly advise using rvm. Then you will have full control of ruby
and gem versions.

Colin

Sebastjan H. wrote in post #1069754:

lionel first-developer wrote in post #1069751:

It seems that you still using ruby 1.8.

I thought so too, however, ruby -v gives:

ruby 1.9.3p194 (2012-04-20 revision 35410) [i686-linux]

regards,
seba

how would I check for and completely remove version 1.8?

On 23 July 2012 11:58, Sebastjan H. [email protected] wrote:

Colin

=* - current && default

* - default

What does
rvm info
show?

Colin

Colin L. wrote in post #1069761:

On 23 July 2012 10:29, Sebastjan H. [email protected] wrote:

regards,
seba

how would I check for and completely remove version 1.8?

I strongly advise using rvm. Then you will have full control of ruby
and gem versions.

Colin

I am using rvm and according to the printout for rvm list I was sure I
don’t have 1.8:

rvm rubies

ruby-1.9.3-p125 [ i686 ]
=* ruby-1.9.3-p194 [ i686 ]

=> - current

=* - current && default

* - default

regards
seba

My guess is you’ve got something wrong in your shell environment. What
do
you see when you type:

$(*which ruby) --version*

NOTE: this is proper syntax for sh, bash, or ksh. For csh use: which ruby --version

Rick

Rick Lloyd wrote in post #1069775:

My guess is you’ve got something wrong in your shell environment. What
do
you see when you type:

$(*which ruby) --version*

produced
bash: syntax error near unexpected token `–version*’

and

which ruby --version

produced
bash: */home/sebah/.rvm/rubies/ruby-1.9.3-p194/bin/ruby: No such file or
directory

Colin L. wrote in post #1069764:

On 23 July 2012 11:58, Sebastjan H. [email protected] wrote:

Colin

=* - current && default

* - default

What does
rvm info
show?

Colin

rvm info:

ruby-1.9.3-p194:

system:
uname: “Linux sebah-laptop 3.0.0-23-generic #38-Ubuntu SMP Fri
Jul 6 13:47:10 UTC 2012 i686 i686 i386 GNU/Linux”
bash: “/bin/bash => GNU bash, version 4.2.10(1)-release
(i686-pc-linux-gnu)”
zsh: " => not installed"

rvm:
version: “rvm 1.13.4 (stable) by Wayne E. Seguin
[email protected], Michal P. [email protected]
[https://rvm.io/]”
updated: “2 months 11 days 13 seconds ago”

ruby:
interpreter: “ruby”
version: “1.9.3p194”
date: “2012-04-20”
platform: “i686-linux”
patchlevel: “2012-04-20 revision 35410”
full_version: “ruby 1.9.3p194 (2012-04-20 revision 35410)
[i686-linux]”

homes:
gem: “/home/sebah/.rvm/gems/ruby-1.9.3-p194”
ruby: “/home/sebah/.rvm/rubies/ruby-1.9.3-p194”

binaries:
ruby: “/home/sebah/.rvm/rubies/ruby-1.9.3-p194/bin/ruby”
irb: “/home/sebah/.rvm/rubies/ruby-1.9.3-p194/bin/irb”
gem: “/home/sebah/.rvm/rubies/ruby-1.9.3-p194/bin/gem”
rake: “/home/sebah/.rvm/rubies/ruby-1.9.3-p194/bin/rake”

environment:
PATH:
“/home/sebah/.rvm/gems/ruby-1.9.3-p194/bin:/home/sebah/.rvm/gems/ruby-1.9.3-p194@global/bin:/home/sebah/.rvm/rubies/ruby-1.9.3-p194/bin:/home/sebah/.rvm/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games”
GEM_HOME: “/home/sebah/.rvm/gems/ruby-1.9.3-p194”
GEM_PATH:
“/home/sebah/.rvm/gems/ruby-1.9.3-p194:/home/sebah/.rvm/gems/ruby-1.9.3-p194@global”
MY_RUBY_HOME: “/home/sebah/.rvm/rubies/ruby-1.9.3-p194”
IRBRC: “/home/sebah/.rvm/rubies/ruby-1.9.3-p194/.irbrc”
RUBYOPT: “”
gemset: “”

lionel first-developer wrote in post #1069780:

Try this as well :

rvm use ruby-1.9.3-p125

and retry :slight_smile:

nope, still the same error as above.

/usr/local/lib/site_ruby/1.8/rubygems/dependency.rb:247:in to_specs': Could not find railties (>= 0) amongst [] (Gem::LoadError) from /usr/local/lib/site_ruby/1.8/rubygems/dependency.rb:256:into_spec’
from /usr/local/lib/site_ruby/1.8/rubygems.rb:1231:in `gem’
from /usr/local/bin/rails:18
sebah@sebah-laptop:~/rails/blog$

Try this as well :

rvm use ruby-1.9.3-p125

and retry :slight_smile:

2012/7/23 Sebastjan H. [email protected]

which ruby --version
“Ruby on Rails: Talk” group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit https://groups.google.com/groups/opt_out.

lionel Bastian LONKAP TSAMBA
tudiant 4e anne Gnie Informatique et Statistiques Polytech-lille

Site: http://first-developer.fr

Email: [email protected]

Tel: +336 12 48 03 01

lionel Bastian LONKAP TSAMBA

Fourth year student in Software Engineering and Statistics

at the Lille University Graduate School of Engineers (Polytech-Lille)

Site: http://first-developer.fr

Email: [email protected]

Phone: +336 12 48 03 01

Colin L. wrote in post #1069800:

On 23 July 2012 12:15, Sebastjan H. [email protected] wrote:

Colin
zsh: " => not installed"
date: “2012-04-20”
ruby: “/home/sebah/.rvm/rubies/ruby-1.9.3-p194/bin/ruby”
MY_RUBY_HOME: “/home/sebah/.rvm/rubies/ruby-1.9.3-p194”
IRBRC: “/home/sebah/.rvm/rubies/ruby-1.9.3-p194/.irbrc”
RUBYOPT: “”
gemset: “”

How about
gem list

Colin

well, I only get this:

*** LOCAL GEMS ***

Try again without the asterisks, they were for formatting in the mail
you
copied from…
Am 23.07.2012 15:29 schrieb “Sebastjan H.” [email protected]:

Norbert M. wrote in post #1069957:

Try again without the asterisks, they were for formatting in the mail
you
copied from…
Am 23.07.2012 15:29 schrieb “Sebastjan H.” [email protected]:

Did you mean:

sebah@sebah-laptop:~$ which ruby --version
ruby 1.9.3p194 (2012-04-20 revision 35410) [i686-linux]

On 23 July 2012 12:15, Sebastjan H. [email protected] wrote:

Colin
zsh: " => not installed"
date: “2012-04-20”
ruby: “/home/sebah/.rvm/rubies/ruby-1.9.3-p194/bin/ruby”
MY_RUBY_HOME: “/home/sebah/.rvm/rubies/ruby-1.9.3-p194”
IRBRC: “/home/sebah/.rvm/rubies/ruby-1.9.3-p194/.irbrc”
RUBYOPT: “”
gemset: “”

How about
gem list

Colin

On 24 July 2012 15:04, Sebastjan H. [email protected] wrote:

ruby 1.9.3p194 (2012-04-20 revision 35410) [i686-linux]

I’ve checked my ubuntu program centre and there I have something called
a transitional package for ruby 1.8 (I am backtranslating from my
language). If I try to uninstall it I’d have to uninstall some
dependencies and I am not sure if I may.

No need to do that, your are using rvm so it should be using the
version installed under rvm.
Can you post the complete output from trying to create a new rails app.

Colin

Sebastjan H. wrote in post #1069964:

Norbert M. wrote in post #1069957:

Try again without the asterisks, they were for formatting in the mail
you
copied from…
Am 23.07.2012 15:29 schrieb “Sebastjan H.” [email protected]:

Did you mean:

sebah@sebah-laptop:~$ which ruby --version
ruby 1.9.3p194 (2012-04-20 revision 35410) [i686-linux]

I’ve checked my ubuntu program centre and there I have something called
a transitional package for ruby 1.8 (I am backtranslating from my
language). If I try to uninstall it I’d have to uninstall some
dependencies and I am not sure if I may.

Colin L. wrote in post #1070094:

On 24 July 2012 15:04, Sebastjan H. [email protected] wrote:

ruby 1.9.3p194 (2012-04-20 revision 35410) [i686-linux]

I’ve checked my ubuntu program centre and there I have something called
a transitional package for ruby 1.8 (I am backtranslating from my
language). If I try to uninstall it I’d have to uninstall some
dependencies and I am not sure if I may.

No need to do that, your are using rvm so it should be using the
version installed under rvm.
Can you post the complete output from trying to create a new rails app.

Colin

I’ve uninstalled the transitional package anyways and it didn’t help. It
still tries to access the location below.

The entire output:

sebah@sebah-laptop:~/rails$ rails new test
/usr/local/lib/site_ruby/1.8/rubygems/dependency.rb:247:in to_specs': Could not find railties (>= 0) amongst [] (Gem::LoadError) from /usr/local/lib/site_ruby/1.8/rubygems/dependency.rb:256:in to_spec’
from /usr/local/lib/site_ruby/1.8/rubygems.rb:1231:in `gem’
from /usr/local/bin/rails:18

Colin L. wrote in post #1070100:

On 25 July 2012 09:21, Sebastjan H. [email protected] wrote:

version installed under rvm.
/usr/local/lib/site_ruby/1.8/rubygems/dependency.rb:247:in to_specs': Could not find railties (>= 0) amongst [] (Gem::LoadError) from /usr/local/lib/site_ruby/1.8/rubygems/dependency.rb:256:in to_spec’
from /usr/local/lib/site_ruby/1.8/rubygems.rb:1231:in `gem’
from /usr/local/bin/rails:18

Have you installed rails inside rvm? Try
gem install rails
Note, no sudo.

After several attempts I get:

sebah@sebah-laptop:~/rails$ gem install rails
ERROR: Could not find a valid gem ‘rails’ (>= 0) in any repository
ERROR: While executing gem … (Gem::RemoteFetcher::FetchError)
too many bad responses (http://rubygems.org/latest_specs.4.8.gz)

sebah@sebah-laptop:~/rails$ gem install rails
ERROR: Could not find a valid gem ‘rails’ (>= 0) in any repository
ERROR: While executing gem … (Gem::RemoteFetcher::FetchError)
too many connection resets (http://rubygems.org/latest_specs.4.8.gz)

sebah@sebah-laptop:~/rails$ gem install rails
ERROR: Could not find a valid gem ‘rails’ (>= 0) in any repository
ERROR: While executing gem … (Gem::RemoteFetcher::FetchError)
too many connection resets (http://rubygems.org/latest_specs.4.8.gz)