rake Virtual timer expired - ruby-on-rails

I am using os x 10.6
1.8.6 via rvm
rails 2.3.6
I can run rake or script/server I get an error Virtual timer expired
I have seen someone else had this issue and seems, the mysql gem needs to be downgraded to 2.7
i have tried to install mysql -v=2.7
i get a different error
ERROR: Error installing mysql:
ERROR: Failed to build gem native extension.
can anyone explain the proper way to get this done
thanks

There are bugs in older versions of ruby and the mysql gem that interact to cause this problem. It has been fixed in 1.8.7, but the fix was not backported to 1.8.6 because it is no longer supported. The following patch can be applied while installing using rvm (see: http://rvm.io/rubies/patching).
https://gist.github.com/mdotterer/8807766

Related

Rails doesn't complete installation on OS X Lion

I'm quite new to Ruby in general and especially RoR, so tell me if I need to add more information.
Upon running sudo gem install rails (after a long delay) I receive the following error message:
ERROR: While executing gem ... (Gem::RemoteFetcher::UnknownHostError)
no such name (https://api.rubygems.org/quick/Marshal.4.8/mime-types-1.17.2.gemspec.rz)
I entered the link and it downloaded something, so I tried again - not entirely surprisingly, I got the same error.
I'm running OSX 10.7.5 and I've installed XCode 4.6.3 as well as the command line tools. I've installed Ruby 2.1.0 so I know I have that up to date. I thought the error might have something to do with sudo typically running whatever came with the machine, but if that's true, wouldn't it give me an error saying I needed a version of Ruby >= 1.9.3?
To be perfectly clear what I'm asking: why will Rails not install under the above conditions, and how can this be remedied?
Edit: I ran the command yet another time and this time it worked, and I don't know why it didn't before or what made it work now. As a note for anyone who should care, I do have RVM installed and used it to install Ruby.
OS X comes with ruby 1.8.x
My guess is that you are still defaulting to that version and not the 2.1 you have installed.
I would recommend installing RVM or equivalent so that you can shift from system 1.8.x to your 2.1 (or else as you can manage several versions of ruby and rails with RVM)
I would recommend against installing rails as root. I ran into this issue where
ruby -v
returned ruby 2.1.0 and
sudo ruby -v
returned ruby 1.9.1
Every time I tried to run
gem install rails
I kept getting errors as a result. I'm not familiar with Mac's package manager but this is what worked for me on ubuntu
sudo apt-get remove ruby1.9.1
then
sudo ruby -v
should return command not found. Then installing rails worked fine
gem install rails
These were the directions I followed. The main problem was I had already installed ruby prior to running(I think heroku toolbelt did it).
https://www.digitalocean.com/community/articles/how-to-install-ruby-on-rails-on-ubuntu-12-04-lts-precise-pangolin-with-rvm

Proper syntax for installing mysql2 gem pre-version 0.3.0 with MYSQL LIB and INCLUDE options on Windows 7

There must a million variations of this problem but I don't seem to be finding any answers.
I spent the afternoon looking for a way to install MYSQL 5.5 on my Windows 7, 64-bit machine and install the mysql2 gem. Finally I found Lukom's comment at the RORGUIDE blog and I was off and running with this code:
gem install mysql2 -- '--with-mysql-lib="C:\TEMP\msi\Files\MySQL\MySQL Server 5.5\lib" --with-mysql-include="C:\TEMP\msi\Files\MySQL\MySQL Server 5.5\include"'
So, this installs the 0.3.6 version of the mysql2 gem. Hooray! However, when I try to run the db:create I get the following error:
WARNING: This version of mysql2 (0.3.6) doesn't ship with the ActiveRecord adapter bundled anymore as it's now part of Rails 3.1
WARNING: Please use the 0.2.x releases if you plan on using it in Rails <= 3.0.x
So I figure all I have to do is uninstall the gem and reinstall a version less that 0.3.0 and I am back on track. However, I cannot find the code to properly indicate the gem version AND my lib/include arguments. Here is my best attempt and the error:
gem install mysql2 --version "0.2.7" '--with-mysql-lib="C:\TEMP\msi\Files\MySQL\MySQL Server 5.5\lib" --with-mysql-include="C:\TEMP\msi\Files\MySQL\MySQL Server 5.5\include"'
invalid option: --with-mysql-lib=C:\TEMP\msi\Files\MySQL\MySQL Server 5.5\lib
So I am at a loss. I don't want to upgrade to the Rails pre-release because I don't enjoy troubleshooting that much. I am sure this is a simple syntax error and I would appreciate anyone who can show me the correct command for both the version and lib/include arguments.
Thanks in advance,
Byron
Try this:
gem install mysql2 --version '0.2.7' -- --with-mysql-lib="C:\TEMP\msi\Files\MySQL\MySQL Server 5.5\lib" --with-mysql-include="C:\TEMP\msi\Files\MySQL\MySQL Server 5.5\include"

Confusion with installing different ruby gems

I installed rubygems-1.7.2 but then out of some confusion with not being able to install rails when I ran this command:
gem install rails
and I got this error:
ERROR: Error installing rails:
bundler requires RubyGems version >= 1.3.6
That is a bit strange since the rubygems I have on my system is a much later version. Do I maybe need to configure it somehow so that my shell recognizes it? What is a step I might be missing to have this resolved?
I have
/usr/local/rubygems-1.7.2
was it supposed to get installed in a different directory or something?
Installing RVM made it unnecessary to install RubyGems separately...I think :)

"msvcrt-ruby18.dll was not found" with Ruby

When I try to run even simple rails commands such as:
rails -h
I get a popup error after a few seconds that says:
ruby.exe - Unable To Locate Component
This application has failed to start
because msvcrt-ruby18.dll was not
found. Re-installing the application
may fix the problem.
I am running:
Windows XP (yes I know I should attempt ruby on a Windows machine).
Ruby 1.9.1p378 [i386-mingw32].
Have updated all my gems to latest versions (as of 14-July-2010).
Is there a way I can test what is making this error? Does anyone know what it could mean?
I have found that in my ruby19/bin folder there is msvcrt-ruby191.dll but there is no msvcrt-ruby18.dll anywhere. Why would it be looking for this anyway if I'm using ruby 1.9?
The current release version 1.1.5 of Mongrel is incompatible with Ruby 1.9 and throws this error when it is run. It's easy to solve - just make sure Rubygems is up-to-date:
gem update --system
Then install the new pre-release version of Mongrel:
gem install mongrel --pre
Alternatively, if this isn't caused by Mongrel, you can try installing the DevKit, then try this:
gem install *gemname* --platform=ruby
This forces compilation of the extension from source using DevKit and works with most of the major gems I've tried.
Ruby 1.9.1 was running well on my Windows XP PC, but I've got this error message after installing mongrel. Unfortunately, mongrel has no update for Ruby 1.9.1 yet. Perhaps, for this reason, it generates this error on my PC.
JRuby might work better for you. Either way, trying to use Ruby on Windows will leave a bad taste in your mouth. Either get a VM with Linux to work with it, or pay $10/mo for a VPS where you can play.
you got the binary version of the gem, which only includes binaries for 1.8
try gem install mongrel --platform=ruby --pre
To solved msvcrt-ruby.dll error
Install DevKit ( https://github.com/oneclick/rubyinstaller/wiki/Development-Kit )
> gem uninstall json
> gem install json

Rails requires RubyGems >= 0.9.4. Please install RubyGems

I'm deploying to Ubuntu slice on slicehost, using Rails 2.1.0 (from gem)
If I try mongrel_rails start or script/server I get this error:
Rails requires RubyGems >= 0.9.4. Please install RubyGems
When I type gem -v I have version 1.2.0 installed. Any quick tips on what to look at to fix?
Have you tried reinstalling RubyGems? I had a pretty similar error message until I reuninstalled and for some reason, it installed into a different directory and then the problem went away.
Just finally found this answer... I was missing a gem, and thrown off by bad error message from Rails...

Resources