Ubuntu 10 Ruby 1.9 Rails 3: No such file or directory
log in as root user
remove old ruby
list ruby packeges
dpkg -l | grep ruby
then remove all ruby packegesaptitude purge <package name>
if you have rvm installedrvm remove all
thenrvm implode
orrvmsudo rvm implode
install ruby
still logged in as root
install all of the necessary tools and libraries
apt-get install curl git-core build-essential zlib1g-dev libssl-dev libreadline5-dev
install rvmbash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)
Then add this line as the last line in your .bashrc:nano ~/.bash_profile
if [[ -s "$HOME/.rvm/scripts/rvm" ]] ; then source "$HOME/.rvm/scripts/rvm" ; fi
test RVM installrvm notes
Next, you can begin ruby 1.9.2 installation by runningrvm install 1.9.2
The install will take up to several minutes and once it completes you have to set ruby 1.9.2 as the default versionrvm --default ruby-1.9.2
test your new ruby installruby -v
install Rails 3
gem install rails
If you want to get a quick database up and running with sqlite, then you’ll need to sqlite3 and the libsqlite3-dev packagesapt-get install sqlite3 libsqlite3-dev
gem install sqlite3-ruby
create new apprails new testapp
cd testapp
Make sure you are in your test app directory and runrails s
Open your browser athttp://localhost:3000
Ruby 1.9.2 and Rails 3 cannot open rails console
Apparently ubuntu and ruby don't always catch dependencies like they should.
From the first google hit (yeah, I clicked on this stack-overflow in place #2 before checking out the first result.)
Navigate to the Ruby source and enter:
sudo apt-get install libreadline5-dev
cd ext/readline
ruby extconf.rb
make
sudo make install
So, if you're on another distro, make sure you install readline somehow (source/package), then run make/install on extconf from the source. I tried what gkaykck suggested of course but got this without readline already on my system.$ ruby extconf.rb
checking for tgetnum() in -lncurses... no
checking for tgetnum() in -ltermcap... no
checking for tgetnum() in -lcurses... no
checking for readline/readline.h... no
checking for editline/readline.h... no
rails 3, why I can't use command line at ubuntu?
I don't believe your rvm has been setup correctly. For sake of simplicity, let's start from the beginning following the instructions here:
http://beginrescueend.com/rvm/install/
Install in command line.
user$ bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer )
Open your .bashrc folder in your home directory.user$ vim .bashrc
Edit and add:[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function
Source your .bashrc file and close the terminaluser$ source ~/.bashrc
user$ exit
Reopen terminal and check if rvm is working.user$ type rvm | head -1
If it returns rvm is a function
We're good. Check if you have all of the prerequisites:rvm requirements
Install as necessary. Pick your favorite flavor of ruby (it seems like it is 1.8.7, if so follow the exact command or replace it with your choice).rvm install 1.8.7
When its done,rvm use 1.8.7 --default
If this didn't work, please update post by runningwhich ruby
Installed Ruby 1.9.3 with RVM but command line doesn't show ruby -v
You have broken version of RVM. Ubuntu does something to RVM that produces lots of errors, the only safe way of fixing for now is to:
sudo apt-get --purge remove ruby-rvm
sudo rm -rf /usr/share/ruby-rvm /etc/rvmrc /etc/profile.d/rvm.sh
open new terminal and validate environment is clean from old RVM settings (should be no output):env | grep rvm
if there was output, try to open new terminal, if it does not help then restart your computer.install RVM:
\curl -L https://get.rvm.io |
bash -s stable --ruby --autolibs=enable --auto-dotfiles
If you find you need some hand-holding, take a look at Installing Ruby on Ubuntu 12.04, which gives a bit more explanation. Ruby 1.9.3 - cannot load such file for some reason
It happens because of the wrong Sublime Text build system. The right one is here How to run ruby files in sublime-text-2
Ubuntu not detecting Rails installation
As rails
gem was installed and all the other paths look correct, you need to set rvm
to use that ruby as your default version. It will set all the paths correctly so you can use your gems and rails
command.
rvm use 1.9.3 --default
Load error while creating new Rails application
Finaly solved.
ln -s /share/MD0_DATA/.qpkg/Optware/lib/libcrypto.so.0.9.8 /lib/libcrypto.so.0.9.8
did the trick.
Related Topics
I Am Getting This Gem Install Error for Kgio Gem When I Do a Bundle Install
Truncate String When It Is Too Long
How to Interact with a Caldav Server from Ruby
Gem Install Pg for Ruby on Rails
How to Convert a Fraction to Float in Ruby
Why Can't The Mail Block See My Variable
How to Remove a Url's Trailing Slash in a Rails App? (In a Seo View)
What Is The Ruby Equivalent to This Curl Request
Deleting a Specific Line in a Text File
Heroku Repo Size and Slug Size Increase with Each Deployment. Why
Capybara & Cucumber | Getting Cookies
Ruby-Open3.Popen3/How to Print The Output
Why The Unit Test Frameworks in Fortran Rely on Ruby Instead of Fortran Itself
Docker-Compose Restart Connection Pool Full
What Ruby Technique Does Rails Use to Make My Controller Methods Render Views