I think I nailed it this time! Here is a revised script. I found that the latest "stable version" of ruby is 1.9.3-p0 and that rake is included already in ruby.
So I removed the line that was installing rake, and updated the ruby install to the latest version....and viola...we are up and running!
On Dec 15, 9:28 pm, Arthur Baldwin <eengn...@yahoo.com> wrote:
> I think I nailed it this time! Here is a revised script. I found that the latest "stable version" of ruby is 1.9.3-p0 and that rake is included already in ruby.
>
> So I removed the line that was installing rake, and updated the ruby install to the latest version....and viola...we are up and running!
>
> Sincerely,
>
> Arthur Baldwin
>
> # Copyright (C) 2011 Quiliro Ordóñez
>
> # This program is free software: you can redistribute it and/or modify
> # it under the terms of the GNU Affero General Public License as
> # published by the Free Software Foundation, either version 3 of the
> # License, or (at your option) any later version.
>
> # This program is distributed in the hope that it will be useful,
> # but WITHOUT ANY WARRANTY; without even the implied warranty of
> # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> # GNU Affero General Public License for more details.
>
> # You should have received a copy of the GNU Affero General Public License
> # along with this program. If not, see <http://www.gnu.org/licenses/>.
>
> # quiliro [at] fsfla [dot] org
>
> echo Updating the APT Database...
> sudo apt-get update
> echo APT Group installation...
> sudo apt-get -y install wget curl build-essential bison openssl zlib1g libxslt1.1 libssl-dev libxslt1-dev libxml2 libffi-dev libyaml-dev libxslt-dev autoconf libc6-dev libreadline6-dev zlib1g-dev libcurl4-openssl-dev libmysqlclient16-dev libmysqlclient16 imagemagick libmagick9-dev git-core mysql-server
> echo WGet Ruby Language...
> wget -cftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p0.tar.gz
but when I issue the following command:
hobo new TCO -d mysql
and try to run the wizard, it stops right away after telling it to run the wizard and says:
Could not find gem 'mysql2 (~> 0.2.17) ruby' in any of the gem sources listed in your Gemfile.
Run `bundle install` to install missing gems.
Hmmmm......why can't we adjust the script to do something so that bundler does NOT have to run in the new app directory?I need to be able to issue the command: hobo new myapp -d mysql
without any hiccups.
sudo gem list | cut -d" " -f1 | xargs gem uninstall -aIx
# Copyright (C) 2011 Quiliro Ord��ez
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see<http://www.gnu.org/licenses/>.
# quiliro [at] fsfla [dot] org
# InstantHobo.bash version 0.3
#
# This program installs Hobo stable version 1.3 on Trisquel distribution
# of the GNU operating system by installing Ruby version 1.9.3-p0 from
# source and by using apt-get it installs other binary software packages.
# Have fun using and modifying this script. Please send me your updates
# so I can share them with others.
# Just make a text file named InstantHobo.bash and make it executable by
# typing:
# sudo chmod +x InstantHobo.bash
# Then execute it by typing:
# ./InstantHobo.bash
#
# Note: If you want to remove all gems before running this script, type:
# sudo gem list | cut -d" " -f1 | xargs sudo gem uninstall -aI
# Keep hacking!
echo Updating the APT Database...
sudo apt-get update
echo APT Group installation...
sudo apt-get -y install wget curl build-essential bison openssl zlib1g libxslt1.1 libssl-dev libxslt1-dev libxml2 libffi-dev libyaml-dev libxslt-dev autoconf libc6-dev libreadline6-dev zlib1g-dev libcurl4-openssl-dev libmysqlclient16-dev libmysqlclient16 imagemagick libmagick9-dev git-core mysql-server
echo WGet Ruby Language...
wget -cftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p0.tar.gz
echo UnZip Ruby Language...
tar -xzf ruby-1.9.3-p0.tar.gz
echo Change to Ruby Language Directory...
cd ruby-1.9.3-p0
echo Configure Ruby Language for Compilation...
sudo ./configure --prefix=/usr/local
echo Compiling the Ruby Language files...
sudo make
echo Installing the Ruby Language...
sudo make install
echo Using new values on the default path
source ~/.bashrc
echo Using Gem to install MySQL2 driver...
sudo gem install mysql2
echo Using Gem to Install Hobo...
sudo gem install hobo
> # Copyright (C) 2011 Quiliro Ordусez
with:
# Copyright (C) 2011 Quiliro Ordóñez
One more little issue:
The problems seem to begin when during the configuration step for Ruby Language
it displays an error that says something about
"can't configure dbm"
then shortly after that:
"can't configure gdbm"
Is it possible that the script needs to be changed when using KUbuntu rather than Ubuntu? I am now using KUbuntu.
I'm still testing the new script now...hang on...
I'm still testing the new script now...hang on...
I won't have news until later tonight...had to reinstall KUbuntu because of several screwups.Will be testing on a clean install of KUbuntu 11.10 tonight after work.
The other error messages I reported may not be affecting the usefulness of hobo, but they really should be addressed by someone.
There is a one line install, then it has scripts to install whichever
ruby you want. I recommend 1.9.2-patched. It's only disadvantage is
that it takes time to compile.
If you want something simpler (for production where you don't
necessarily have to switch rubies) then there is a package already
built to install ruby.
https://github.com/garethr/packages/downloads
I don't see the point in reinventing the wheel with more scripts.
Ankur
I don't see the point in reinventing the wheel with more scripts.
I really don't want to audit more software for nonfree parts. Also, I
would like the installation to be available to all users. That is why I
prefer to use less tools hence avoiding RVM. I would even like to avoid
gems. It would be nice to have a .deb that installs Hobo and its
dependencies.
I heartily agree. However, I would like to see a package designed to integrate with Muon Software Center (KUbuntu version akin to Software Center for Ubuntu) that would successfully do everything to install Hobo (including Ruby and Rails). This is really THE necessary step to make it popular among users to try using Hobo.
This shows me that the following gem related packages were not successfully installed by our script:
Installing json (1.6.3) with native extensions
Installing rdoc (3.12)Installing mysql2 (0.2.18) with native extensions
Find out why our script is failing in this area...and we'll have our answer.
Please notice that the error message is "expecting" version 0.2.17 of mysql2, not 0.2.18!
Since the current script already includes the line:
sudo gem install mysql2
it must be that "mysql2" depends upon either json or rdoc...or maybe both.
I will be testing that theory tonight.
echo Using Gem to install json...
sudo gem install json
echo Using Gem to install RDoc...
sudo gem install rdoc
echo Using Gem to install MySQL2 driver...
sudo gem install mysql2 -v 0.2.18
I can see that the current version for mysql2 is 0.3.11. If you remove
the currently installed mysql2 versions and install the latest version
(0.3.11), will it work?
sudo gem remove mysql2
(Repeat the above command until there are no more mysql2 gems installed.)
sudo gem install mysql2
(Now test.)
I will make a mod of the script for Parabola so we can have InstantHobo
for various GNU platforms.
Dear Quiliro,
Unfortunately...I've found the real problem. Although the latest version is 0.3.11...it is also THE version that causes the problem I was describing since the beginning of this new round of script design. By issuing the following two commands I fixed the problem:
sudo gem uninstall mysql2sudo gem install mysql2 -v 0.2.18
So...it is time for the developers of the mysql2 driver to fix their code. Unless perhaps it's just that hobo isn't able to get past version 0.2.18 yet?Either way...for now the script must include the -v 0.2.18. At least until the problem is fixed.
#!/bin/bash
# Copyright (C) 2011 Quiliro Ordусez
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see<http://www.gnu.org/licenses/>.
# quiliro [at] fsfla [dot] org
# InstantHobo.bash version 0.4
#
# This program installs Hobo stable version 1.3 on Trisquel distribution
# of the GNU operating system by installing Ruby version 1.9.3-p0 from
# source and by using apt-get it installs other binary software packages.
# Have fun using and modifying this script. Please send me your updates
# so I can share them with others.
# Just make a text file named InstantHobo.bash and make it executable by
# typing:
# sudo chmod +x InstantHobo.bash
# Then execute it by typing:
# ./InstantHobo.bash
#
# Note: If you want to remove all gems before running this script, type:
# sudo gem list | cut -d" " -f1 | xargs sudo gem uninstall -aIxsudo
apt-get update
# Keep hacking!
# Additional Contributions by Arthur E. Baldwin
# The mysql2.gem file is not designed to properly choose the correct
# version number, so it is necessary to include the -v parameter and the
# desired version number. Otherwise you will be using this script in
vain.
# This script has been thoroughly tested primarily on Trisquel 5.0 and on
# KUbuntu 11.10 (64 bit). We're leaving it up to others to test and
report
# their findings on other distros.
echo "Installing stable versions of Ruby and Rubygems"
echo "as well as the git versioning system"
sudo apt-get install ruby rubygems git-core
echo "Setting the path for the gem command for the current user"
echo "PATH="/var/lib/gems/1.8/bin:$PATH"" >> $HOME/.profile
echo "Setting the path for the gem command for future users"
echo "PATH="/var/lib/gems/1.8/bin:$PATH"" >> /etc/profile
echo "Updating currently installed gems"
sudo gem update
echo "Installing Apache web server"
sudo aptitude install apache2
# Choosing the database
echo " Choose database"
echo " ------ --------"
echo "Choose one of the following databases:"
echo
echo "[M]ySQL 5"
echo "[S]QLite 3"
echo
read database
case "$database" in
"M" | "m" )
echo "Installing mysql2 gem"
sudo gem install mysql2
echo "Installing MySQL database management system server"
sudo aptitude install mysql-server libmysqlclient-dev
;;
"S" | "s" )
echo "Installing sqlite3"
sudo aptitude install libsqlite3-dev
echo "Installing sqlite3 gem"
sudo gem install sqlite3
;;
esac
echo "Installing the Hobo gem"
sudo gem install hobo
# End of script
--
Saludos.
Quiliro Ord��ez
(02)2595632
(02)3401517
09-6782520
Si me equivoco, al menos se que soy qui�n se equivoc� y no que me dieron
equivoc�ndome.
Quito, Ecuador
#!/bin/bash
# Copyright (C) 2011 Quiliro Ordonez
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
# You should have received a copy of the GNU Affero General Public
# License along with this program. If not, see
# <http://www.gnu.org/licenses/>.
# quiliro [at] fsfla [dot] org
# InstantHobo.bash version 0.4.1
#
# This program installs Hobo stable version 1.3 on Trisquel distribution
# of the GNU operating system by installing Ruby version 1.9.3-p0 from
# source and by using apt-get it installs other binary software packages.
# Have fun using and modifying this script. Please send me your updates
# so I can share them with others.
# Just make a text file named InstantHobo.bash and make it executable by
# typing:
# sudo chmod +x InstantHobo.bash
# Then execute it by typing:
# ./InstantHobo.bash
#
# Note: If you want to remove all gems before running this script, type:
# sudo gem list | cut -d" " -f1 | xargs sudo gem uninstall -aIx
# Keep hacking!
# Additional Contributions by Arthur E. Baldwin
# The mysql2.gem file is not designed to properly choose the correct
# version number, so it is necessary to include the -v parameter and the
# desired version number. Otherwise you will be using this script in
# vain.
# This script has been thoroughly tested primarily on Trisquel 5.0 and on
# KUbuntu 11.10 (64 bit). We're leaving it up to others to test and
# report their findings on other distros.
echo "Updating package database"
sudo apt-get update
echo
echo "Installing stable versions of Ruby and Rubygems"
echo "as well as the git versioning system"
sudo apt-get -y install ruby rubygems git-core
echo
echo "Setting the path for the hobo command for the current user"
echo "PATH="/var/lib/gems/1.8/bin:$PATH"" >> $HOME/.profile
source $HOME/.profile
echo
echo "Setting the path for the hobo command for future users"
sudo sh -c 'echo "PATH="/var/lib/gems/1.8/bin:$PATH"" >> /etc/profile'
echo
echo "Updating currently installed gems"
sudo gem update
echo
echo "Installing Apache web server"
sudo apt-get -y install apache2
# Choosing the database
echo
echo " Choose database"
echo " ------ --------"
echo "Choose one of the following databases:"
echo
echo "[M]ySQL 5"
echo "[S]QLite 3"
echo
read database
case "$database" in
"M" | "m" )
echo "Installing MySQL database management system server"
sudo apt-get -y install mysql-server libmysqlclient-dev
echo "Installing mysql2 gem"
sudo gem install mysql2 -v 0.2.17
;;
"S" | "s" )
echo "Installing SQLite 3 database management system server"
sudo apt-get -y install libsqlite3-dev