When I use 2.0.0 I have no problems.
When I update to 2.1.1 I get the error.
On my server Amazon Linux
Using Passenger with ruby 2.0.0p451 I receive the undefined method `searchable'
Strange thing is that this works fine on my dev box
OSX 10.9.4
Using the same ruby version.
Any guidance would be very helpful
Thanks
Rod
I found the solution myself.
I had to manually install the gem using a combination of "sudo gem install sunspot-rails -v 2.1.0" and "gem install sunspot_rails -v 2.1.0"
It appears that it was a rights issue. I figured this out by looking in the gems folder for my Ruby version.
Hopefully this will help someone debug these issues in the future.
Related
I've been working with Rails a while now, and want to setup a local VM'd server. For some reason, I keep running into errors while trying to install Rails on Ubuntu Server 11.10. Specifically, when running 'gem install rails', I get errors about not being able to build native extensions. Moreover, after I install Ruby, it says it's version 1.9.2, but after attempting to install Rails, it's telling me it's version 1.8.7... I'm at my wits end here, and Google isn't helping.
Can anyone give me a quick rundown of the commands to make this work, from Ruby installation onwards? It should be simple, but I'm obviously missing a step or two, and my Google Fu is failing me horribly. Any help would be greatly appreciated.
I will guess that you're having trouble installing the linecache19 gem. You need to get a copy of the ruby source and install the gem with
gem install ruby-debug19 -- --with-ruby-include=/path/to/ruby/source
You know, someone should fix this...
When installing Rails 3.0.1 i always get following error message, although i can use the installation.
I'm not sure if there's something wrong, I'm irritated by the error message.
As in the answer by balupton:
Ruby on Rails Beta 3 Install Problem on Snow Leopard
gem install rdoc
Follow instructions and then rerun
gem install rails
No errors occur to me now.
That didn't work for me, but this did sudo gem install rails --no-rdoc --no-ri
I had a similar problem today. Serpenstage's answer helped and lead me to find this guide here. http://pragmaticstudio.com/blog/2010/9/23/install-rails-ruby-mac
It installs RVM too, which is useful for running multiple versions of ruby.
Did you install Ruby before installing rails? I ran into the same problem until I went to https://help.ubuntu.com/community/RubyOnRails#Get%20Ruby. There are a number of steps you have to take before you install rails and I think this will help, if you are running it on the Ubuntu OS. Hope it works for you!
I am trying to get my Instant Rails working on my Windows 7 laptop.
The error I keep getting when trying to access my site files are:
c:/rails/ruby/lib/site_ruby/1.8/rubygems.rb:779:in 'report_activate_error'
RubyGem version error: rack<1.1.0 not~> 1.0.1> <Gem::LoadError>
from c:/rails/ruby/lib/ruby.site_ruby/1.8/rubygems.rb:214:in 'activate'
from c:/rails/ruby/lib/ruby.site_ruby/1.8/rubygems.rb:1082:in 'gem'
from c:/depot/vendor/rails/actionpack/lib/action_controller.rb:34
from c://rails/ruby/lib/ruby.site_ruby/1.8/rubygems/custom_require.rb:31 in 'gem_original_require'
etc...
I have intalled Rubygems 1.3.7 and they work fine and when I run the test it works and the gem env shows that the 1.3.7 has been installed correctly.
What can I do to get this working?
Any prompt help would be VERY appreciated.
Thanks
Your rack gem is outdated. Try to run gem update rack. Or, if you use Rails with Bundler, just run bundle install in the root of your project and it will do everything for you.
I decided to write a little manual about the Ruby 1.8.7 and Rails stable installation.
Download RubyInstaller 1.8.7 from here. During the installation, check the 'Add Ruby executables to your PATH' box. After the installation, don't forget to restard cmd. Then try running ruby -v and gem -v to check for installed Ruby 1.8.7 and RubyGems 1.3.7;
Install the latest stable Rails 2.3.8 using gem install rails --no-ri --no-rdoc; Check it using rails -v;
Create a new application using rails myapp;
Test it: script/server. That's it!
gem install rack -v 1.0.1
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
I tried to install the new beta on my system with the command:
sudo gem install rails --pre
but no matter what I tried, I still get this damn error:
Successfully installed
rails-3.0.0.beta3 1 gem
installed Installing ri
documentation for
rails-3.0.0.beta3... File not
found: lib
Since I'm very new to ruby, I really don't know what to do.
How can I finish installing this?
Is this installed already?
Why does it abort here?
All you need to run is gem install rdoc, follow its instructions, then run the install rails command again and you're good. The problem is due to rdoc failing to install when installed with rails, if installed manually it works fine.
Source: http://gist.github.com/565967
^ I had the same problem, and this worked for me.
If you're looking to do ruby/rails development on Mac, I'd strongly recommend not using the version of ruby/rubygems shipped with your mac. What I do recommend is:
Installing homebrew and using that to manage software packages on your mac.
Install brewbygems, which makes homebrew play nice with rubygems: gem install brewbygems
Install rvm and learn to love the different versions of ruby and rvm's gemsets feature: gem install rvm
Once you've done that you'll have a pretty robust development environment and you should be able to install any version of rails without a problem. Just keep in mind rails 3 works best using ruby 1.9.2 (install with rvm by running rvm install ruby-head) and is still in beta, meaning it isn't terribly stable and should not be used for anything production grade (yet).
I found the same error message, while after some google I've successfully installed it by manually 'sudo mkdir lib' in the .../gems/rails-3.0.0.beta3. Though it hasn't raised further problem, I hope someone could tell what should be in the missing lib directory.
You don't really need to do this sudo gem install rails --pre, simply sudo gem install rails. Rails3 is the default package now and out of beta.
It should work fine.
Might be a different solution on your OS, but I got the same exact error in Ubuntu and creating a ¨lib¨ folder under the rails gem folder solved my problem. I have explained the solution in the following post:
Installing Rails: "File not found: lib"
For convenience I will copy it here as well. The solution:
mkdir /lib/ruby/gems/1.8/gems/rails-{whatever your version is}/lib
Explanation: The ¨[sudo] gem install rails¨ command expects the /lib folder (at the end) but for some reason it hasn´t been created yet.
The original source of this solution was the following URL. Hope it helps!
http://www.spritle.com/blogs/?p=915
Same problem with beta 4.
The workaround is sudo gem install rails --pre --no-ri --no-rdoc though I don't know why.