I cant use any rails command in my created project WHY!

I use rails 3.0 In my created dir I tried to use any command of rails
just like
rails -v but it show me that
Could not find gem ‘sqlite3-ruby (>= 0, runtime)’ in any of the gem
sources.
Try running bundle install.
I’ve already exactly installed gem Why this error occurred What’s wrong

                                                       Thanks

On 24 Sep 2010, at 10:59, Tanawat L. wrote:

I use rails 3.0 In my created dir I tried to use any command of rails
just like
rails -v but it show me that
Could not find gem ‘sqlite3-ruby (>= 0, runtime)’ in any of the gem
sources.
Try running bundle install.
I’ve already exactly installed gem Why this error occurred What’s
wrong

Make sure you have the following line in your Gemfile:

gem ‘sqlite3-ruby’, :require => ‘sqlite3’

Then do “bundle install”

Gems not defined in your Gemfile will NOT be loaded, even if you have
them installed.

Best regards

Peter De Berdt

Peter De Berdt wrote:

On 24 Sep 2010, at 10:59, Tanawat L. wrote:

I use rails 3.0 In my created dir I tried to use any command of rails
just like
rails -v but it show me that
Could not find gem ‘sqlite3-ruby (>= 0, runtime)’ in any of the gem
sources.
Try running bundle install.
I’ve already exactly installed gem Why this error occurred What’s
wrong

Make sure you have the following line in your Gemfile:

gem ‘sqlite3-ruby’, :require => ‘sqlite3’

Then do “bundle install”

Gems not defined in your Gemfile will NOT be loaded, even if you have
them installed.

Best regards

Peter De Berdt

It did not work Peter I try to create project with mysql like
rails new apple -d mysql
gem ‘rails’, ‘3.0.0’
gem ‘mysql2’
are already written
but the problem stay still
Could not find gem ‘mysql2 (>= 0, runtime)’ in any of the gem sources.
Try running bundle install.

What should I do T^T

Tanawat L. wrote:

Peter De Berdt wrote:

On 24 Sep 2010, at 10:59, Tanawat L. wrote:

I use rails 3.0 In my created dir I tried to use any command of rails
just like
rails -v but it show me that
Could not find gem ‘sqlite3-ruby (>= 0, runtime)’ in any of the gem
sources.
Try running bundle install.
I’ve already exactly installed gem Why this error occurred What’s
wrong

Make sure you have the following line in your Gemfile:

gem ‘sqlite3-ruby’, :require => ‘sqlite3’

Then do “bundle install”

Gems not defined in your Gemfile will NOT be loaded, even if you have
them installed.

Best regards

Peter De Berdt

It did not work Peter I try to create project with mysql like
rails new apple -d mysql
gem ‘rails’, ‘3.0.0’
gem ‘mysql2’
are already written
but the problem stay still
Could not find gem ‘mysql2 (>= 0, runtime)’ in any of the gem sources.
Try running bundle install.

What should I do T^T

do you run bundle install?

3.3 Installing the Required Gems

Rails applications manage gem dependencies with Bundler by default. As
we don’t need any other gems beyond the ones in the generated Gemfile we
can directly run
bundle install to have them ready.

Solrac C. wrote:

Tanawat L. wrote:

Peter De Berdt wrote:

On 24 Sep 2010, at 10:59, Tanawat L. wrote:

I use rails 3.0 In my created dir I tried to use any command of rails
just like
rails -v but it show me that
Could not find gem ‘sqlite3-ruby (>= 0, runtime)’ in any of the gem
sources.
Try running bundle install.
I’ve already exactly installed gem Why this error occurred What’s
wrong

Make sure you have the following line in your Gemfile:

gem ‘sqlite3-ruby’, :require => ‘sqlite3’

Then do “bundle install”

Gems not defined in your Gemfile will NOT be loaded, even if you have
them installed.

Best regards

Peter De Berdt

It did not work Peter I try to create project with mysql like
rails new apple -d mysql
gem ‘rails’, ‘3.0.0’
gem ‘mysql2’
are already written
but the problem stay still
Could not find gem ‘mysql2 (>= 0, runtime)’ in any of the gem sources.
Try running bundle install.

What should I do T^T

do you run bundle install?

Getting Started with Rails — Ruby on Rails Guides
3.3 Installing the Required Gems

Rails applications manage gem dependencies with Bundler by default. As
we don’t need any other gems beyond the ones in the generated Gemfile we
can directly run
bundle install to have them ready.

Problem stay still after running bundle install it show

Installing mysql2 (0.2.4) with native extensions
/usr/local/lib/ruby/1.9.1/rubygems/installer.rb:483:in `rescue in block
in build_extensions’: ERROR: Failed to build gem native extension.
(Gem::Installer::ExtensionBuildError)

I exactly dont know why ?
cause of I install ruby 1.9.1 then reinstall 1.9.2 ???

rajeevsharma86 wrote:

http://rubyforge.org/frs/download.php/62497/mysql-2.8.1-x86-mingw32.gem

this is for mysql
Download run “gem install mysql-2.8.1-x86-mingw32 --local”
in gemfile change mysql2 to mysql hope it works

On Fri, Sep 24, 2010 at 4:00 PM, Tanawat L.
[email protected]wrote:

Try running bundle install.
them installed.
are already written

(Gem::Installer::ExtensionBuildError)
To unsubscribe from this group, send email to
[email protected][email protected]
.
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.


Thanks:
Rajeev sharma

Still did’nt work Why it’s not contain Gemfile ???
ERROR: Could not find a valid gem ‘mysql-2.8.1-x86-mingw32’ (>= 0) in
any repository

However thanks I’m very new for linux and rails

you are on linux how did you install rails from which tutorial

On Fri, Sep 24, 2010 at 4:36 PM, Tanawat L.
[email protected]wrote:

Try running bundle install.
http://groups.google.com/group/rubyonrails-talk?hl=en.
any repository
[email protected][email protected]
.
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.


Thanks:
Rajeev sharma

http://rubyforge.org/frs/download.php/62497/mysql-2.8.1-x86-mingw32.gem

this is for mysql
Download run “gem install mysql-2.8.1-x86-mingw32 --local”
in gemfile change mysql2 to mysql hope it works

On Fri, Sep 24, 2010 at 4:00 PM, Tanawat L.
[email protected]wrote:

Try running bundle install.
them installed.
are already written

(Gem::Installer::ExtensionBuildError)
To unsubscribe from this group, send email to
[email protected][email protected]
.
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.


Thanks:
Rajeev sharma

rajeevsharma86 wrote:

you are on linux how did you install rails from which tutorial

On Fri, Sep 24, 2010 at 4:36 PM, Tanawat L.
[email protected]wrote:

Try running bundle install.
http://groups.google.com/group/rubyonrails-talk?hl=en.
any repository
[email protected][email protected]
.
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.


Thanks:
Rajeev sharma

in a console:
cd /
mysql -V
gem list

Solrac C. wrote:

rajeevsharma86 wrote:

you are on linux how did you install rails from which tutorial

On Fri, Sep 24, 2010 at 4:36 PM, Tanawat L.
[email protected]wrote:

Try running bundle install.
http://groups.google.com/group/rubyonrails-talk?hl=en.
any repository
[email protected][email protected]
.
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.


Thanks:
Rajeev sharma

in a console:
cd /
mysql -V
gem list

This one Rajeev

Your MySQL connection id is 36
Server version: 5.1.41-3ubuntu12.6 (Ubuntu)

*** LOCAL GEMS ***

abstract (1.0.0)
actionmailer (3.0.0)
actionpack (3.0.0)
activemodel (3.0.0)
activerecord (3.0.0)
activeresource (3.0.0)
activesupport (3.0.0)
arel (1.0.1)
builder (2.1.2)
bundler (1.0.0)
erubis (2.6.6)
i18n (0.4.1)
mail (2.2.6.1)
mime-types (1.16)
minitest (1.6.0)
polyglot (0.3.1)
rack (1.2.1)
rack-mount (0.6.13)
rack-test (0.5.5)
rails (3.0.0)
railties (3.0.0)
rake (0.8.7)
rdoc (2.5.8)
thor (0.14.1)
treetop (1.4.8)
tzinfo (0.3.23)

                                         Thanks everyone

Solrac C. wrote:

cd /
su root (enter your password)
gem update
gem install mysql
gem list

The result still the same :frowning:

abstract (1.0.0)
actionmailer (3.0.0)
actionpack (3.0.0)
activemodel (3.0.0)
activerecord (3.0.0)
activeresource (3.0.0)
activesupport (3.0.0)
arel (1.0.1)
builder (2.1.2)
bundler (1.0.0)
erubis (2.6.6)
i18n (0.4.1)
mail (2.2.6.1)
mime-types (1.16)
minitest (1.7.2, 1.6.0)
polyglot (0.3.1)
rack (1.2.1)
rack-mount (0.6.13)
rack-test (0.5.5)
rails (3.0.0)
railties (3.0.0)
rake (0.8.7)
rdoc (2.5.11, 2.5.8)
thor (0.14.1)
treetop (1.4.8)
tzinfo (0.3.23)

The suspicious thing is I can run ‘rails’ outside my project dir
why???

cd /
su root (enter your password)
gem update
gem install mysql
gem list

I don’t see mysql…what is the output of:
cd /
su root
gem install mysql

Solrac C. wrote:

I don’t see mysql…what is the output of:
cd /
su root
gem install mysql

The result is

ERROR: Error installing mysql:
ERROR: Failed to build gem native extension.
.
.
.
.
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.

:frowning:

Have you ever installed MySQL (the database server) from source on
this computer? It sounds like you don’t have the libraries and headers
that the mysql gem needs to compile a native Ruby bridge for your
specific server. It is entirely possible and likely to have a working
mysql server daemon on your computer, without having the development
header files that compiled it.

Walter

Tanawat L. wrote:

Solrac C. wrote:

I don’t see mysql…what is the output of:
cd /
su root
gem install mysql

The result is

ERROR: Error installing mysql:
ERROR: Failed to build gem native extension.
.
.
.
.
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.

:frowning:

can you post your mkmf.log ?

cd /usr/local/lib/ruby
find . -name mkmf.log

Solrac C. wrote:

Tanawat L. wrote:

Solrac C. wrote:

I don’t see mysql…what is the output of:
cd /
su root
gem install mysql

The result is

ERROR: Error installing mysql:
ERROR: Failed to build gem native extension.
.
.
.
.
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.

:frowning:

can you post your mkmf.log ?

cd /usr/local/lib/ruby
find . -name mkmf.log

I change to windows 7 platform and use Netbeans to develop the problem
stay still the same WTF ???

Any one help meeeeeeeeeeeeeeee plzzzzzz T____________T

Hi,
am not too sure if this would help you. but try the installation guide
(attached) that I had created to help with the ruby-rails installation
on windows. i suppose your problem should be because you dont have the
sqlite3dll files in your ruby/bin directory…

Tanawat L. wrote in post #943779:

Solrac C. wrote:

Tanawat L. wrote:

Solrac C. wrote:

I don’t see mysql…what is the output of:
cd /
su root
gem install mysql

The result is

ERROR: Error installing mysql:
ERROR: Failed to build gem native extension.
.
.
.
.
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.

:frowning:

can you post your mkmf.log ?

cd /usr/local/lib/ruby
find . -name mkmf.log

I change to windows 7 platform and use Netbeans to develop the problem
stay still the same WTF ???

Any one help meeeeeeeeeeeeeeee plzzzzzz T____________T

Hi,

I am not too sure if my documentation would help you. But give it a try.
I have attached a word doc that I had created to help with ruby-rails
installation.