file 'lib' not found when installing rails
try this :
sudo gem install rails --no-ri --no-rdoc
and if you want to install RDoc use :
sudo gem install rdoc-data
sudo rdoc-data --install
sudo gem rdoc --all --overwrite
if that doesnt work try this :
sudo apt-get install ruby-dev build-essential
rails 3 install error File not found: lib
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.
Installing Rails: File not found: lib On Windows 7
The best tool to use for rails in windows is rails installer for windows and it comes with the latest version of rails. I just hope this helps you solve your problems
Rails not finding files on lib folder
On rails < 5:
config/application.rb
module your_app
class Application < Rails::Application
# Settings in config/environments/* take precedence over those specified here.
# Application configuration should go into files in config/initializers
# -- all .rb files in that directory are automatically loaded.
config.autoload_paths += %W(#{config.root}/lib/path)
end
end
on rails >= 5
module your_app
class Application < Rails::Application
config.eager_load_paths << "#{Rails.root}/lib/path"
end
end
If you want rails to auto load your lib you have to place it under the app
folder.
File not found: lib when switching to older rails version using RVM
I think you went off the rails (ha-ha) right here:
sudo gem install rails --version=3.0.1
The RVM documentation has this to say about that:
DO NOT use sudo...
to work with RVM gems. When you do
sudo you are running commands as root,
another user in another shell and
hence all of the setup that RVM has
done for you is ignored while the
command runs under sudo (such things
as GEM_HOME, etc...). So to reiterate,
as soon as you 'sudo' you are running
as the root system user which will
clear out your environment as well as
any files it creates are not able to
be modified by your user and will
result in strange things happening.
(You will start to think that someone
has a voodoo doll of your
application...)
problem in installing rails
I had the same problem. I continued with the error. I do not see anything breaking. And I can code peacefully. So, probably you do not need to worry.
sudo apt-get install build-essential libopenssl-ruby libfcgi-dev
sudo apt-get install ruby irb rubygems ruby1.8-dev
sudo apt-get install sqlite3 libsqlite3-dev
sudo gem install rails
sudo gem install sqlite3-ruby
If you dont find path do this: (for Unix based systems)
Quoted from the book, but anyone else would suggest the same
If you can’t find the rails command, you may need to add
/var/lib/gems/1.8/bin to your PATH environment variable.
You can do this by adding a line to your .bashrc file:
export PATH=/var/lib/gems/1.8/bin:$PATH
OK as aditya sanghi has mentioned, I do lack rdoc gem-- so probably running this will help
gem install rdoc rails
Related Topics
How to Set an Attr_Accessor for a Dynamic Instance Variable
Restoring Rails 3's Bundle Install Path... It's Now Install in My Root
Ruby Method Calls Declared in Class Body
Check Whether a String Contains One of Multiple Substrings
Mongodb with Mongoid in Rails - Geospatial Indexing
Generate Unique Random String with Letters and Numbers in Lower Case
Find Out If an Ip Is Within a Range of Ips
What's the Opposite of Chr() in Ruby
Ruby: Most Concise Way to Use an Env Variable If It Exists, Otherwise Use Default Value
Installing the Postgresql Gem with 'Gem Pq' Fails with Error: Failed to Build Gem Native Extension
Disable a Group of Tests in Rspec
Finding What Is Common to Two Arrays
Capybara: Select an Option by Value Not Text
If Java People Go to Scala, C# Go to F#, Where Do Ruby People Go for Functional Nirvana
How to Login a User with Devise
Ruby on Rails Gem for Google Map Integration
How to Password-Protect My /Sidekiq Route (I.E. Require Authentication for the Sidekiq::Web Tool)