I am trying to install rails on Ubuntu 8.10, and met following errors. Please help me get through.Thanks.
root#pierr-desktop:~# gem install rails
ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError)
bad response 500 (http://gems.rubyforge.vm.bytemark.co.uk/gems/actionpack-2.3.4.gem)
#other information
root#pierr-desktop:~# ruby -v
ruby 1.8.7 (2008-08-11 patchlevel 72) [i486-linux]
root#pierr-desktop:~# gem -v
1.2.0
root#pierr-desktop:~# gem list
*** LOCAL GEMS ***
activerecord (2.3.4)
activesupport (2.3.4, 1.4.4)
daemons (1.0.10)
gem_plugin (0.2.3)
rack (1.0.1)
rake (0.8.7, 0.8.3)
wirble (0.1.3)
You might just have to try again.
Looks like the server returned an error 500 which seems to be intermittent.
Related
When I try to run rails s or rails c I get the following error:
Your Ruby version is 2.3.1, but your Gemfile specified 2.1.2
so I try ruby -v and get:
ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-linux]
and when I do which ruby I get:
/home/xxx/.rvm/rubies/ruby-2.1.2/bin/ruby
Even if I explicitly run rvm use 2.1.2 I still get the same error.
Can somebody please explain me what is wrong??
Solved - problem was old version of raindrops Gem.
Since I never use bundle update, I had an old version of it. The Gemfile.lock looked like this:
GEM
remote: https://rubygems.org/
specs:
:
:
raindrops (0.12.0)
:
:
unicorn (4.7.0)
kgio (~> 2.6)
rack
raindrops (~> 0.7)
I deleted the line of the independent gem (0.12.0) and ran bundle install. I got this gem back with version 0.17.0.
I am using the Scrubyt gem, and when I use it, I get this error:
/home/bitnami/.rvm/gems/ruby-1.8.7-p352/gems/scrubyt-0.4.06/lib/scrubyt/core/navigation/agents/mechanize.rb:17:in `included': uninitialized constant Scrubyt::Navigation::Mechanize::WWW (NameError)
I have the following gems installed
*** LOCAL GEMS ***
builder (3.0.0)
commonwatir (2.0.1)
firewatir (1.9.3)
hoe (2.12.2)
hpricot (0.8.4)
mechanize (2.0.1)
net-http-digest_auth (1.1.1)
net-http-persistent (1.9)
nokogiri (1.5.0)
rake (0.9.2)
s4t-utils (1.0.4)
scrubyt (0.4.06)
user-choices (1.1.6.1)
webrobots (0.0.11)
xml-simple (1.1.0)
Any idea what could be wrong here?
I was having the same problem. I resolved this issue installing the exact versions of hpricot and Mechanize
sudo gem install hpricot -v 0.5
sudo gem install mechanize -v 0.6.3
then
sudo gem install scrubyt
but first I uninstalled previous gem versions with
sudo gem uninstall hpricot
sudo gem uninstall mechanize
I am trying to get a basic Rails application to run on my Mac OS X 10.6.5. I created a new app called demo (rails new demo), then went into the demo directory and tried to start the app with rails server.
Here is the error message I received:
"/Users/dpetrovi/.gem/ruby/1.8/gems/sqlite3-ruby-1.3.2/lib/sqlite3/sqlite3_native.bundle: [BUG] Segmentation fault
ruby 1.8.7 (2010-12-23 patchlevel 330) [i686-darwin10]
Abort trap"
I checked bundle install in the demo folder:
Using rake (0.8.7)
Using abstract (1.0.0)
Using activesupport (3.0.3)
Using builder (2.1.2)
Using i18n (0.5.0)
Using activemodel (3.0.3)
Using erubis (2.6.6)
Using rack (1.2.1)
Using rack-mount (0.6.13)
Using rack-test (0.5.6)
Using tzinfo (0.3.23)
Using actionpack (3.0.3)
Using mime-types (1.16)
Using polyglot (0.3.1)
Using treetop (1.4.9)
Using mail (2.2.13)
Using actionmailer (3.0.3)
Using arel (2.0.6)
Using activerecord (3.0.3)
Using activeresource (3.0.3)
Using bundler (1.0.7)
Using thor (0.14.6)
Using railties (3.0.3)
Using rails (3.0.3)
Using sqlite3-ruby (1.3.2)
Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.
Ruby, RubyGems, and sqlite3 were installed using MacPorts. Then I used gem to try to install the sqlite3-ruby interface. (sudo gem install sqlite3-ruby). Here is where I first noticed something could be off:
Successfully installed sqlite3-ruby-1.3.2
1 gem installed
Installing ri documentation for sqlite3-ruby-1.3.2...
No definition for libversion
Enclosing class/module 'mSqlite3' for class Statement not known
Installing RDoc documentation for sqlite3-ruby-1.3.2...
No definition for libversion
Enclosing class/module 'mSqlite3' for class Statement not known
I had rails running well on my system a few months ago, so I figured maybe I had some duplicates and it was trying to use the wrong one. I ran: for cmd in ruby irb gem rake; do which $cmd; done and got:
/opt/local/bin/ruby
/opt/local/bin/irb
/opt/local/bin/gem
/opt/local/bin/rake
Checking where sqlite3 also gets me: "/opt/local/bin/sqlite3" so they all seem to be in the right place. Obviously /opt/local/bin is in my system path.
If I check gems server, it shows that I have installed sqlite3-ruby 1.3.2 gem. Not sure what the problem could be?
I am using ruby 1.8.7 (2010-12-23 patchlevel 330) [i686-darwin10]. Macports claims this is the latest (although ive seen 1.9.1)
One more thing-- in irb, I tried to check which version of sqlite3 my sqlite3-ruby is bound to, but I can only get this far:
:irb(main):001:0> require 'rubygems'
=> true
irb(main):002:0> require 'sqlite3'
/Users/dpetrovi/.gem/ruby/1.8/gems/sqlite3-ruby-1.3.2/lib/sqlite3/sqlite3_native.bundle: [BUG] Segmentation fault
ruby 1.8.7 (2010-12-23 patchlevel 330) [i686-darwin10]
Abort trap
Any suggestions? Im hoping I overlooked something obvious. Thanks
Have you upgraded to Snow Leopard recently? If so, you need to reinstall MacPorts and all the ports installed with it.
I recommend using RVM instead MacPorts installed ruby.
Definitely use RVM as mentioned above and then try this in your app's directory:
rm -rf .bundle && bundle install
i had the same problem. here is how i resolved it.
removed the gem sqlite3-ruby
did bundle install
reinstalled the gem
recreated the rails app
now webrick works fine.
I've looked all over the web for about a week now and not found a solution to my problem. I have a Ruby on Rails application I'm trying to deploy to a production Ubuntu 10.04 server edition box. I've got Apache2.2 and Passenger3.0.0 installed with Ruby 1.8.7, Rails 2.3.5 and RubyGems 1.3.7. My rails application is in /var/rails_app_name/ and rubygems/ruby is installed at /var/lib/gems/1.8
I have a test server with ubuntu 10.04 (gui edition) running the same setup and configuration which works like a charm. The only difference is my rails application root is in the user local folder e.g. /home/username/rails_app_name/
My problem is that on the production server, Passenger is giving me an error: "Missing the Rails 2.3.5 gem. Please 'gem install -v=2.3.5 rails'. update your RAILS_GEM_VERSION...."
I installed the rails gem in both gem directories listed by running a gem environment. Here are some config results:
%> gem environment
RUBYGEMS VERSION: 1.3.7
RUBY VERSION: 1.8.7 (2010-01-10 patchlevel 249) [i486-linux]
INSTALLATION DIRECTORY: /var/lib/gems/1.8
RUBY EXECUTABLE: /usr/bin/ruby1.8
EXECUTABLE DIRECTORY: /var/lib/gems/1.8/bin
RUBYGEMS PLATFORMS:
ruby
x86-linux
GEM PATHS:
/var/lib/gems/1.8
/home/sross/.gem/ruby/1.8
GEM CONFIGURATION:
:update_sources => true
:verbose => true
:benchmark => false
:backtrace => false
:bulk_threshold => 1000
REMOTE SOURCES:
http://rubygems.org/
%> gem list
actionmailer (2.3.5)
actionpack (2.3.5)
activemodel (3.0.3)
activerecord (2.3.5)
activeresource (2.3.5)
activesupport (3.0.3, 2.3.5)
acts_as_audited (1.1.1)
arel (2.0.4)
authlogic (2.1.6)
builder (2.1.2)
cancan (1.4.1)
daemon_controller (0.2.5)
fastthread (1.0.7)
file-tail (1.0.5)
i18n (0.4.2)
passenger (3.0.0)
rack (1.0.1)
rails (2.3.5)
rake (0.8.7)
spruz (0.2.2)
tzinfo (0.3.23)
%> which gem
/usr/bin/gem
%> which ruby
/usr/bin/ruby
** /etc/apache2/mods-enabled/passenger.conf **
PassengerRoot /var/lib/gems/1.8/gems/passenger-3.0.0
PassengerRuby /usr/bin/ruby
** /etc/apache2/mods-enabled/passenger.load **
LoadModule passenger_module /var/lib/gems/1.8/gems/passenger-3.0.0/ext/apache2/mod_passenger.so
Let me know if you want to see anything else. I installed everything with sudo, all my rubygems directories, ruby directories, application directories are chmod 755 so www-data should have access correct? I've tried setting GEM_HOME to both rubygems paths and making sure the rails gem is in there too.
Help this is killing me!
Update:
gem list for test server (which works fine)
abstract (1.0.0)
actionmailer (3.0.0, 2.3.8, 2.3.5)
actionpack (3.0.0, 2.3.8, 2.3.5)
activemodel (3.0.0)
activerecord (3.0.0, 2.3.8, 2.3.5)
activeresource (3.0.0, 2.3.8, 2.3.5)
activesupport (3.0.0, 2.3.8, 2.3.5)
acts_as_audited (1.1.1)
arel (1.0.1)
authlogic (2.1.6)
builder (2.1.2)
bundler (1.0.0)
cancan (1.3.4)
cgi_multipart_eof_fix (2.5.0)
daemon_controller (0.2.5)
daemons (1.1.0)
dbi (0.4.5)
deprecated (2.0.1)
erubis (2.6.6)
fastthread (1.0.7)
file-tail (1.0.5)
gem_plugin (0.2.3)
mail (2.2.5)
mime-types (1.16)
mongrel (1.1.5)
mongrel_cluster (1.0.5)
mysql (2.8.1)
passenger (3.0.0)
polyglot (0.3.1)
rack (1.2.1, 1.1.0, 1.0.1)
rack-mount (0.6.13)
rack-test (0.5.4)
rails (2.3.5)
railties (3.0.0)
rake (0.8.7)
spruz (0.2.2)
thor (0.14.0)
treetop (1.4.8)
tzinfo (0.3.23)
validates_date_time (1.0.0)
I pulled in a co-worker to take another look at this problem and we found this post to convert the misleading and unhelpful error listed in my original post into the actual error text. The root of the problem ended up coming from which versions of particular gems were installed and where they were installed. AFIAK I ended up needing rack version 1.0.0 and version 1.0.1.
So passing what I learned from this problem to others: If you get a "Missing the Rails X.X.X gem..." take a look at your boot.rb file and make the change explained in the link above. This will display the real problem, which seems to always be an incorrect version of some other gem causing the rails gem to fail it's load process.
Thanks to everyone who spent time looking into my original post!
Can you check apache for your ruby ? Look for
PassengerRuby /usr/bin/ruby
Its possible you have passenger looking at the wrong ruby (could be multiple installed in 2 directories)
I'm trying to install a rails server for my application. I'm using ubuntu 10.04 TLS with apache2 as web server. I made some search on google but I do not found something that help me. When I tried to connect on my application I have following error:
The application has exited during startup (i.e. during the evaluation of config/environment.rb). The error message can be found below. To solve this problem, please follow any instructions in the error message.
Error message:
Missing the Rails 2.3.5 gem. Please gem install -v=2.3.5 rails, update your RAILS_GEM_VERSION setting in config/environment.rb for the Rails version you do have installed, or comment out RAILS_GEM_VERSION to use the latest version installed.
So I do not understand since rails is installed:
desktop:/etc/apache2$ rails -v
Rails 2.3.5
gem list:
gem list
*** LOCAL GEMS ***
abstract (1.0.0)
actionmailer (2.3.5)
actionpack (2.3.5)
activerecord (2.3.5)
activeresource (2.3.5)
activesupport (2.3.5)
arel (1.0.1)
builder (2.1.2)
bundler (1.0.0)
cgi_multipart_eof_fix (2.5.0)
daemon_controller (0.2.5)
daemons (1.1.0)
erubis (2.6.6)
fastthread (1.0.7)
file-tail (1.0.5)
gem_plugin (0.2.3)
i18n (0.4.1)
linecache (0.43)
mail (2.2.5)
mime-types (1.16)
mongrel (1.1.5)
needle (1.3.0)
net-ssh (1.1.4)
passenger (2.2.15)
polyglot (0.3.1)
rack (1.0.1)
rack-mount (0.6.13)
rack-test (0.5.4)
rails (2.3.5)
rake (0.8.7)
ruby-debug-base (0.10.3)
ruby-debug-ide (0.4.5)
rubyzip (0.9.4)
spruz (0.1.5)
sqlite3-ruby (1.3.1)
thor (0.14.0)
treetop (1.4.8)
tzinfo (0.3.23)
MORE INFO: I'm developping on windows and my server is a Linux maybe the problem is there. I don't know. anyway thanks in advance for help.
Even if I'm root user I cannot open console:
root#et1-desktop:/home/et1/wip3/sophia/script# ./console
Loading development environment (Rails 2.3.5)
sh: irb: not found
gem environment
RubyGems Environment:
- RUBYGEMS VERSION: 1.3.7
- RUBY VERSION: 1.8.7 (2010-01-10 patchlevel 249) [x86_64-linux]
- INSTALLATION DIRECTORY: /usr/lib/ruby/gems/1.8
- RUBY EXECUTABLE: /usr/bin/ruby1.8
- EXECUTABLE DIRECTORY: /usr/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-linux
- GEM PATHS:
- /usr/lib/ruby/gems/1.8
- /home/et1/.gem/ruby/1.8
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- :sources => ["http://gems.rubyforge.org/", "http://gems.rubyforge.org"]
- REMOTE SOURCES:
- http://gems.rubyforge.org/
- http://gems.rubyforge.org
is the following line added in environment.rb
RAILS_GEM_VERSION = '2.3.5' unless defined? RAILS_GEM_VERSION
and also try this command in terminal. see is there any rails gem installed
gem list
I also saw this problem when there are multiple ruby version in the system that are refering to different gem repositories. If this is the case, these commands should help debugging:
which ruby
which gem
and from docs rubygem]1
gem environment
It could be that the user which you are logging in at the command prompt does not have the same list of gems as the user you are running the server as.
This commonly happens when you have installed gems as the command line user without using sudo which means they will be available only to that user.
It would be worth checking where your gems are installed. If they are in a folder .gem from your user's home directory that indicates they are installed for that user only.
I would try firing up a shell as the user the server runs as and ensuring that user has the gem access you require.
I think I found my problem, First I follow the instruction of following links: http://gembundler.com/rails23.html
Next I run command rake db:migrate RAILS_ENV=production
After that the server is working fine.
Thanks to all for help.
I really hope this helps someone: I was running into the same problem "Missing the Rails 2.3.5 gem" ... The way that I solved it was I moved my application to heroku stack bamboo-ree-1.8.7
heroku stack:migrate bamboo-ree-1.8.7 and in my config/environment.rb file I added config.gem "rack", :version => '1.0.1'
The problem is that rack 1.1.0 will not work with rails 2.3.5