Hi all, I am a beginner developer on Rails. Unfortunately I have problems with the database connection for a week! I read many articles, but still not work properly. The problem: If I start a new Rails app, and I type: rails app_name -d database -> it still make me an adapter with sqlite3. I use Ubunu 10.4. I installed Ruby, Gem, than Rails. I chekcked: ruby -v -> 1.8.7 gem -v -> 1.3.5 rails -v -> getopt: invalid option -- ''v'' (I don''t understand this one, it should be different?) I can start mysql monitoring, so it is installed and working well. I reinstalled rails a few time, because first I forget -include-dependencies, or sudo, but now it seems okay, and it really makes me the basic app - but not with mysql! I read much, but still cannot solve it, any help is welcome! :) Thanks a lot, gezope -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Philip Hallstrom
2010-Jun-02 23:32 UTC
Re: problem with database still sqlite3 and i want mysql
On Jun 2, 2010, at 1:39 PM, Gerő Zoltán wrote:> Hi all, > I am a beginner developer on Rails. Unfortunately I have problems with the database connection for a week! I read many articles, but still not work properly. > > The problem: If I start a new Rails app, and I type: rails app_name -d database -> it still make me an adapter with sqlite3.Are you literally typing "rails app_name -d database" or are you typing "rails app_name -d mysql"?> I use Ubunu 10.4. I installed Ruby, Gem, than Rails. I chekcked: > ruby -v -> 1.8.7 > gem -v -> 1.3.5 > rails -v -> getopt: invalid option -- ''v'' (I don''t understand this one, it should be different?)That should work on 2.3.8 at least (what i''ve got handy). "rails --version" should also work.> I can start mysql monitoring, so it is installed and working well. > > I reinstalled rails a few time, because first I forget -include-dependencies, or sudo, but now it seems okay, and it really makes me the basic app - but not with mysql! I read much, but still cannot solve it, any help is welcome! :) > > Thanks a lot, > gezope > > -- > You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. > For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Hello, thanks for the answer! Sorry, I mistyped, I wrote: ''rails my_app -d mysql'' and it creates everything, but the yaml shows it has sqlite3. Or is it normal? And I always have to change this file also if I typed ''-d mysql''? (It also has 5 questions during the creation: do I wnt to rreally overwrite the 3 dipatch, and 2 more files? I tired both y/n. Rails running, but I''m afraid not properly: ''-v'' and ''--version'' also gives getopt, Terminating...) May I ask: if you start a new Rails project, and type this -d mysql, than the yaml file still contains sqlite3? Or it should be different, right? Thanks a lot! best regards, gezope On jún. 3, 01:32, Philip Hallstrom <phi...-LSG90OXdqQE@public.gmane.org> wrote:> On Jun 2, 2010, at 1:39 PM, Gerő Zoltán wrote: > > > Hi all, > > I am a beginner developer on Rails. Unfortunately I have problems with the database connection for a week! I read many articles, but still not work properly. > > > The problem: If I start a new Rails app, and I type: rails app_name -d database -> it still make me an adapter with sqlite3. > > Are you literally typing "rails app_name -d database" or are you typing "rails app_name -d mysql"? > > > I use Ubunu 10.4. I installed Ruby, Gem, than Rails. I chekcked: > > ruby -v -> 1.8.7 > > gem -v -> 1.3.5 > > rails -v -> getopt: invalid option -- ''v'' (I don''t understand this one, it should be different?) > > That should work on 2.3.8 at least (what i''ve got handy). "rails --version" should also work. > > > > > I can start mysql monitoring, so it is installed and working well. > > > I reinstalled rails a few time, because first I forget -include-dependencies, or sudo, but now it seems okay, and it really makes me the basic app - but not with mysql! I read much, but still cannot solve it, any help is welcome! :) > > > Thanks a lot, > > gezope > > > -- > > You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. > > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > For more options, visit this group athttp://groups.google.com/group/rubyonrails-talk?hl=en.-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Hassan Schroeder
2010-Jun-04 00:30 UTC
Re: problem with database still sqlite3 and i want mysql
On Wed, Jun 2, 2010 at 1:39 PM, Gerő Zoltán <gezope-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I use Ubunu 10.4. I installed Ruby, Gem, than Rails. I chekcked:> rails -v -> getopt: invalid option -- ''v'' (I don''t understand this one, it > should be different?)Yes, it should work.> I reinstalled rails a few time, because first I forget > -include-dependencies, or sudo, but now it seems okayNo, it doesn''t; the fact that it fails on a standard command-line option means you can''t expect anything correct out of it. I would get rid of that current Rails installation completely and start from scratch. Good luck. -- Hassan Schroeder ------------------------ hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org twitter: @hassan -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Thank you for all for your help, you are really helpful! I uninstalled all gems from gem list. Than I removed gem and than removed ruby. Then: 1. sudo apt-get install ruby ; ruby -v -> 1.8.7 2. sudo apt-get install rubygems ; gem -v -> 1.3.5. 3 sudo gem install rails ; rails -v or rails --version -> now gives me the proram raisl currently not installed. Immediately after install! I haven''t typed a clear yet! If I try rails my_app : it works. With -d mysql: still sqlite 3 in the .yaml file. I reinstalled again. I also deleted everything from ubuntu software center. Then the first 2 steps. And then the 3. sudo gem install rails -include-dependencies. Now this -get opt problem like in the beginning. But rails does not work. :) Neither with sqlite3. Hopeless. Mysql still running. I should buy a Mac... :) Now I will remove, reinstall again, maybe one another way, include dependencies or not, export path or not, I try all of the versions. If anyone knows a way, which is coorectly works allways, than please put it to some ubuntu forum also, because every page say different way. Maybe only 5% of the developers have these problems - but very hard to be in this 5%. :) Thx a lot again! gezope On jún. 4, 02:30, Hassan Schroeder <hassan.schroe...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Wed, Jun 2, 2010 at 1:39 PM, Gerő Zoltán <gez...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > I use Ubunu 10.4. I installed Ruby, Gem, than Rails. I chekcked: > > rails -v -> getopt: invalid option -- ''v'' (I don''t understand this one, it > > should be different?) > > Yes, it should work. > > > I reinstalled rails a few time, because first I forget > > -include-dependencies, or sudo, but now it seems okay > > No, it doesn''t; the fact that it fails on a standard command-line option > means you can''t expect anything correct out of it. > > I would get rid of that current Rails installation completely and start > from scratch. > > Good luck. > -- > Hassan Schroeder ------------------------ hassan.schroe...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org > twitter: @hassan-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Hassan Schroeder
2010-Jun-05 17:49 UTC
Re: Re: problem with database still sqlite3 and i want mysql
On Fri, Jun 4, 2010 at 6:30 PM, gezope <gezope-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Then: > 1. sudo apt-get install ruby ; ruby -v -> 1.8.7 > 2. sudo apt-get install rubygems ; gem -v -> 1.3.5. > 3 sudo gem install rails ; rails -v or rails --version -> now gives me > the proram raisl currently not installed. Immediately after install! I > haven''t typed a clear yet!Just out of curiosity, I downloaded Ubuntu 10.4 and created a new VirtualBox VM. I installed ruby and rubygems using the Synaptic GUI package manager. Here''s what followed: hassan@coffee:~$ sudo gem install rails [sudo] password for hassan: Successfully installed rake-0.8.7 Successfully installed activesupport-2.3.8 Successfully installed activerecord-2.3.8 Successfully installed rack-1.1.0 Successfully installed actionpack-2.3.8 Successfully installed actionmailer-2.3.8 Successfully installed activeresource-2.3.8 Successfully installed rails-2.3.8 8 gems installed ... hassan@coffee:~$ mkdir projects hassan@coffee:~$ cd projects hassan@coffee:~/projects$ rails -v The program ''rails'' is currently not installed. You can install it by typing: sudo apt-get install rails hassan@coffee:~/projects$ gem list --local *** LOCAL GEMS *** actionmailer (2.3.8) actionpack (2.3.8) activerecord (2.3.8) activeresource (2.3.8) activesupport (2.3.8) rack (1.1.0) rails (2.3.8) rake (0.8.7) hassan@coffee:~/projects$ gem env RubyGems Environment: - RUBYGEMS VERSION: 1.3.5 - RUBY VERSION: 1.8.7 (2010-01-10 patchlevel 249) [i486-linux] - INSTALLATION DIRECTORY: /var/lib/gems/1.8 - RUBY EXECUTABLE: /usr/bin/ruby1.8 - EXECUTABLE DIRECTORY: /var/lib/gems/1.8/bin - RUBYGEMS PLATFORMS: - ruby - x86-linux - GEM PATHS: - /var/lib/gems/1.8 - /home/hassan/.gem/ruby/1.8 - GEM CONFIGURATION: - :update_sources => true - :verbose => true - :benchmark => false - :backtrace => false - :bulk_threshold => 1000 - REMOTE SOURCES: - http://gems.rubyforge.org/ hassan@coffee:~/projects$ cd /var/lib/gems/1.8/bin hassan@coffee:/var/lib/gems/1.8/bin$ ls total 20 drwxr-xr-x 2 root 4096 2010-06-05 10:27 ./ drwxr-xr-x 7 root 4096 2010-06-05 10:27 ../ -rwxr-xr-x 1 root 369 2010-06-05 10:27 rackup* -rwxr-xr-x 1 root 371 2010-06-05 10:27 rails* -rwxr-xr-x 1 root 367 2010-06-05 10:27 rake* hassan@coffee:/var/lib/gems/1.8/bin$ cd projects hassan@coffee:~$ export PATH=/var/lib/gems/1.8/bin:$PATH hassan@coffee:~$ which rails /var/lib/gems/1.8/bin/rails hassan@coffee:~$ rails -v Rails 2.3.8 hassan@coffee:~$ rails project1 create ... hassan@coffee:~$ rails project2 -d mysql create ... hassan@coffee:~$ cat project1/config/database.yml # SQLite version 3.x # gem install sqlite3-ruby (not necessary on OS X Leopard) development: adapter: sqlite3 database: db/development.sqlite3 pool: 5 timeout: 5000 ... hassan@coffee:~$ cat project2/config/database.yml # MySQL. Versions 4.1 and 5.0 are recommended. # # Install the MySQL driver: # gem install mysql # On Mac OS X: # sudo gem install mysql -- --with-mysql-dir=/usr/local/mysql # On Mac OS X Leopard: # sudo env ARCHFLAGS="-arch i386" gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config # This sets the ARCHFLAGS environment variable to your native architecture # On Windows: # gem install mysql # Choose the win32 build. # Install MySQL and put its /bin directory on your path. # # And be sure to use new-style password hashing: # http://dev.mysql.com/doc/refman/5.0/en/old-client.html development: adapter: mysql encoding: utf8 reconnect: false database: project2_development pool: 5 username: root password: host: localhost ... hassan@coffee:~$ So, not knowing what could be messed up on your system, especially after a lot of repeated install/uninstall cycles, you might want to try a complete OS reinstall... HTH! -- Hassan Schroeder ------------------------ hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org twitter: @hassan -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Fidel Viegas
2010-Jun-05 18:20 UTC
Re: Re: problem with database still sqlite3 and i want mysql
I am also using Ubuntu 10.04 and it all works fine for me. Don''t install gems from the repository. Here is what I did: 1) sudo apt-get install ruby 2) wget http://production.cf.rubygems.org/rubygems/rubygems-1.3.7.tgz 3) tar -xvzf rubygems-1.3.7.tgz 4) cd rubygems 5) ruby setup.rb 6) gem install rails and you should be set. Don''t forget to install mysql and sqlite3-ruby. Don''t forget to install the development libraries for mysql and sqlite3. This are from the repository using apt-get When I installed rails from the repositories I ran into the same problems you are running now. It couldn''t find teh application. I don''t remember how I sorted it, but I know it had something to do with it not being in the path. I now only install ruby from the repositories. I manually download rubygems and then install it manually. Let me know if you still run into problems. All the best, Fidel. On 6/5/10, gezope <gezope-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Thank you for all for your help, you are really helpful! > > I uninstalled all gems from gem list. Than I removed gem and than > removed ruby. > Then: > 1. sudo apt-get install ruby ; ruby -v -> 1.8.7 > 2. sudo apt-get install rubygems ; gem -v -> 1.3.5. > 3 sudo gem install rails ; rails -v or rails --version -> now gives me > the proram raisl currently not installed. Immediately after install! I > haven''t typed a clear yet! > > If I try rails my_app : it works. With -d mysql: still sqlite 3 in > the .yaml file. > > I reinstalled again. I also deleted everything from ubuntu software > center. Then the first 2 steps. > And then the 3. sudo gem install rails -include-dependencies. > Now this -get opt problem like in the beginning. But rails does not > work. :) Neither with sqlite3. > Hopeless. Mysql still running. I should buy a Mac... :) > > Now I will remove, reinstall again, maybe one another way, include > dependencies or not, export path or not, I try all of the versions. If > anyone knows a way, which is coorectly works allways, than please put > it to some ubuntu forum also, because every page say different way. > Maybe only 5% of the developers have these problems - but very hard to > be in this 5%. :) > > Thx a lot again! > gezope > > > On jún. 4, 02:30, Hassan Schroeder <hassan.schroe...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> On Wed, Jun 2, 2010 at 1:39 PM, Gerő Zoltán <gez...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> > I use Ubunu 10.4. I installed Ruby, Gem, than Rails. I chekcked: >> > rails -v -> getopt: invalid option -- ''v'' (I don''t understand this one, >> > it >> > should be different?) >> >> Yes, it should work. >> >> > I reinstalled rails a few time, because first I forget >> > -include-dependencies, or sudo, but now it seems okay >> >> No, it doesn''t; the fact that it fails on a standard command-line option >> means you can''t expect anything correct out of it. >> >> I would get rid of that current Rails installation completely and start >> from scratch. >> >> Good luck. >> -- >> Hassan Schroeder ------------------------ hassan.schroe...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org >> twitter: @hassan > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Fidel Viegas
2010-Jun-05 18:25 UTC
Re: Re: problem with database still sqlite3 and i want mysql
On 6/5/10, Hassan Schroeder <hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Just out of curiosity, I downloaded Ubuntu 10.4 and created a new > VirtualBox VM. I installed ruby and rubygems using the Synaptic GUI > package manager. > > Here''s what followed: > > hassan@coffee:~$ sudo gem install rails > [sudo] password for hassan: > Successfully installed rake-0.8.7 > Successfully installed activesupport-2.3.8 > Successfully installed activerecord-2.3.8 > Successfully installed rack-1.1.0 > Successfully installed actionpack-2.3.8 > Successfully installed actionmailer-2.3.8 > Successfully installed activeresource-2.3.8 > Successfully installed rails-2.3.8 > 8 gems installed > ... > hassan@coffee:~$ mkdir projects > hassan@coffee:~$ cd projects > hassan@coffee:~/projects$ rails -v > The program ''rails'' is currently not installed. You can install it by > typing: > sudo apt-get install rails > hassan@coffee:~/projects$ gem list --local > > *** LOCAL GEMS *** > > actionmailer (2.3.8) > actionpack (2.3.8) > activerecord (2.3.8) > activeresource (2.3.8) > activesupport (2.3.8) > rack (1.1.0) > rails (2.3.8) > rake (0.8.7) > hassan@coffee:~/projects$ gem env > RubyGems Environment: > - RUBYGEMS VERSION: 1.3.5 > - RUBY VERSION: 1.8.7 (2010-01-10 patchlevel 249) [i486-linux] > - INSTALLATION DIRECTORY: /var/lib/gems/1.8 > - RUBY EXECUTABLE: /usr/bin/ruby1.8 > - EXECUTABLE DIRECTORY: /var/lib/gems/1.8/bin > - RUBYGEMS PLATFORMS: > - ruby > - x86-linux > - GEM PATHS: > - /var/lib/gems/1.8 > - /home/hassan/.gem/ruby/1.8 > - GEM CONFIGURATION: > - :update_sources => true > - :verbose => true > - :benchmark => false > - :backtrace => false > - :bulk_threshold => 1000 > - REMOTE SOURCES: > - http://gems.rubyforge.org/ > hassan@coffee:~/projects$ cd /var/lib/gems/1.8/bin > hassan@coffee:/var/lib/gems/1.8/bin$ ls > total 20 > drwxr-xr-x 2 root 4096 2010-06-05 10:27 ./ > drwxr-xr-x 7 root 4096 2010-06-05 10:27 ../ > -rwxr-xr-x 1 root 369 2010-06-05 10:27 rackup* > -rwxr-xr-x 1 root 371 2010-06-05 10:27 rails* > -rwxr-xr-x 1 root 367 2010-06-05 10:27 rake* > hassan@coffee:/var/lib/gems/1.8/bin$ cd projects > hassan@coffee:~$ export PATH=/var/lib/gems/1.8/bin:$PATH > hassan@coffee:~$ which rails > /var/lib/gems/1.8/bin/rails > hassan@coffee:~$ rails -v > Rails 2.3.8 > hassan@coffee:~$ rails project1 > create > ... > hassan@coffee:~$ rails project2 -d mysql > create > ... > hassan@coffee:~$ cat project1/config/database.yml > # SQLite version 3.x > # gem install sqlite3-ruby (not necessary on OS X Leopard) > development: > adapter: sqlite3 > database: db/development.sqlite3 > pool: 5 > timeout: 5000 > ... > hassan@coffee:~$ cat project2/config/database.yml > # MySQL. Versions 4.1 and 5.0 are recommended. > # > # Install the MySQL driver: > # gem install mysql > # On Mac OS X: > # sudo gem install mysql -- --with-mysql-dir=/usr/local/mysql > # On Mac OS X Leopard: > # sudo env ARCHFLAGS="-arch i386" gem install mysql -- > --with-mysql-config=/usr/local/mysql/bin/mysql_config > # This sets the ARCHFLAGS environment variable to your native > architecture > # On Windows: > # gem install mysql > # Choose the win32 build. > # Install MySQL and put its /bin directory on your path. > # > # And be sure to use new-style password hashing: > # http://dev.mysql.com/doc/refman/5.0/en/old-client.html > development: > adapter: mysql > encoding: utf8 > reconnect: false > database: project2_development > pool: 5 > username: root > password: > host: localhostSorry, didn''t see your post. Yes, that is how I had resolved it. But as I mentioned in my previous post, I only install ruby from the repositories. I download the rubygems archive and then install it manually. That does not bring me the problem that occurrs when I install from the repositories.> hassan@coffee:~$ > > So, not knowing what could be messed up on your system, especially > after a lot of repeated install/uninstall cycles, you might want to try a > complete OS reinstall...Don''t think that will be necessary. Before I solved the problem, I had done this and the problem persisted. Regards, Fidel. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Dear Fidel, thanks for your helpful answer! :) The thing why I ask further questions here, and not in private is: maybe later will have the same problem, and then it will be searchable! ;) Your advice is fine; the 1,2,3,4 steps are okay (I am also new in Linux, so i suggest 4. ''cd rubygems'' you mean go to the new directory, here it was ''cd rubygems-1.3.7'' , let me know if I misunderstand it please:)) After it: 5. ruby setup.rb says: ERROR: While executing gem ... (Errno::EACCES) Permission denied: ~ /usr/local/lib/site_ruby/1.8/geuntlet_rubygems.rb I tried chmod and sudo chmod 644 and then this location, but it says: cannot access (here the filename). After it I tried to give the path, but i think gem is not on my system yet, so it is kinda useless, but I tried, maybe... (from here: https://help.ubuntu.com/community/RubyOnRails ) I tried this: export PATH=/var/lib/gems/1.8/bin:$PATH After it still neither chmod or setup.rb runs. I tried it 2 more time, once only from Synaptic :D, and then the same way what u suggested (of course first delete every gem for gem list, than remove gem, then remove ruby, than restart the procedure). I also tried irb, than setup.rb, it says undefined local variable, from the directory where it should be. Finally I stopped here, in the 5th point, please help me go on! (It is important for me, to get involved this Ubuntu community - without Rails it seems hopeless. :O) Thanks again, you already helped a lot! :) all the bests, bueno vista, gezope On jún. 5, 20:20, Fidel Viegas <fidel.vie...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I am also using Ubuntu 10.04 and it all works fine for me. > > Don''t install gems from the repository. Here is what I did: > > 1) sudo apt-get install ruby > 2) wgethttp://production.cf.rubygems.org/rubygems/rubygems-1.3.7.tgz > 3) tar -xvzf rubygems-1.3.7.tgz > 4) cd rubygems > 5) ruby setup.rb > 6) gem install rails > > and you should be set. Don''t forget to install mysql and sqlite3-ruby. > Don''t forget to install the development libraries for mysql and > sqlite3. This are from the repository using apt-get > > When I installed rails from the repositories I ran into the same > problems you are running now. It couldn''t find teh application. I > don''t remember how I sorted it, but I know it had something to do with > it not being in the path. I now only install ruby from the > repositories. I manually download rubygems and then install it > manually. > > Let me know if you still run into problems. > > All the best, > > Fidel. > > On 6/5/10, gezope <gez...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Thank you for all for your help, you are really helpful! > > > I uninstalled all gems from gem list. Than I removed gem and than > > removed ruby. > > Then: > > 1. sudo apt-get install ruby ; ruby -v -> 1.8.7 > > 2. sudo apt-get install rubygems ; gem -v -> 1.3.5. > > 3 sudo gem install rails ; rails -v or rails --version -> now gives me > > the proram raisl currently not installed. Immediately after install! I > > haven''t typed a clear yet! > > > If I try rails my_app : it works. With -d mysql: still sqlite 3 in > > the .yaml file. > > > I reinstalled again. I also deleted everything from ubuntu software > > center. Then the first 2 steps. > > And then the 3. sudo gem install rails -include-dependencies. > > Now this -get opt problem like in the beginning. But rails does not > > work. :) Neither with sqlite3. > > Hopeless. Mysql still running. I should buy a Mac... :) > > > Now I will remove, reinstall again, maybe one another way, include > > dependencies or not, export path or not, I try all of the versions. If > > anyone knows a way, which is coorectly works allways, than please put > > it to some ubuntu forum also, because every page say different way. > > Maybe only 5% of the developers have these problems - but very hard to > > be in this 5%. :) > > > Thx a lot again! > > gezope > > > On jún. 4, 02:30, Hassan Schroeder <hassan.schroe...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > >> On Wed, Jun 2, 2010 at 1:39 PM, Gerő Zoltán <gez...-Re5JQEeQqe8@public.gmane.orgm> wrote: > >> > I use Ubunu 10.4. I installed Ruby, Gem, than Rails. I chekcked: > >> > rails -v -> getopt: invalid option -- ''v'' (I don''t understand this one, > >> > it > >> > should be different?) > > >> Yes, it should work. > > >> > I reinstalled rails a few time, because first I forget > >> > -include-dependencies, or sudo, but now it seems okay > > >> No, it doesn''t; the fact that it fails on a standard command-line option > >> means you can''t expect anything correct out of it. > > >> I would get rid of that current Rails installation completely and start > >> from scratch. > > >> Good luck. > >> -- > >> Hassan Schroeder ------------------------ hassan.schroe...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org > >> twitter: @hassan > > > -- > > You received this message because you are subscribed to the Google Groups > > "Ruby on Rails: Talk" group. > > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > To unsubscribe from this group, send email to > > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > For more options, visit this group at > >http://groups.google.com/group/rubyonrails-talk?hl=en.-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Fidel Viegas
2010-Jun-07 12:07 UTC
Re: Re: problem with database still sqlite3 and i want mysql
On 6/6/10, gezope <gezope-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Your advice is fine; the 1,2,3,4 steps are okay (I am also new in > Linux, so i suggest 4. ''cd rubygems'' you mean go to the new directory, > here it was ''cd rubygems-1.3.7'' , let me know if I misunderstand it > please:)) >Yes, this is what I meant.> After it: 5. ruby setup.rb says: > > ERROR: While executing gem ... (Errno::EACCES) > Permission denied: ~ /usr/local/lib/site_ruby/1.8/geuntlet_rubygems.rb > > I tried chmod and sudo chmod 644 and then this location, but it says: > cannot access (here the filename). > > After it I tried to give the path, but i think gem is not on my system > yet, so it is kinda useless, but I tried, maybe... > (from here: https://help.ubuntu.com/community/RubyOnRails ) > I tried this: export PATH=/var/lib/gems/1.8/bin:$PATH > After it still neither chmod or setup.rb runs. > > I tried it 2 more time, once only from Synaptic :D, and then the same > way what u suggested (of course first delete every gem for gem list, > than remove gem, then remove ruby, than restart the procedure). > > I also tried irb, than setup.rb, it says undefined local variable, > from the directory where it should be. > > Finally I stopped here, in the 5th point, please help me go on! (It is > important for me, to get involved this Ubuntu community - without > Rails it seems hopeless. :O) >you need to do in step 5 the following: Don''t need to chmod the file. The permission denied meant that you need to be root to have access to the path described. Try this in step 5) sudo ruby setup.rb Try that and report back. All the best, Fidel. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Thanks a lot, unfortunately my problem hasn''t solved. But I found that everything works well, just it was scary for a beginner. And still strange a bit, but I will not spend more time with it, because all other things are ok, so I did not find it too important - now I have to change the DB on the server when I move the folders, that''s all. Anyway: thank you for all, mostly for Fidel! :) gezope On jún. 7, 14:07, Fidel Viegas <fidel.vie...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On 6/6/10, gezope <gez...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Your advice is fine; the 1,2,3,4 steps are okay (I am also new in > > Linux, so i suggest 4. ''cd rubygems'' you mean go to the new directory, > > here it was ''cd rubygems-1.3.7'' , let me know if I misunderstand it > > please:)) > > Yes, this is what I meant. > > > > > > > After it: 5. ruby setup.rb says: > > > ERROR: While executing gem ... (Errno::EACCES) > > Permission denied: ~ /usr/local/lib/site_ruby/1.8/geuntlet_rubygems.rb > > > I tried chmod and sudo chmod 644 and then this location, but it says: > > cannot access (here the filename). > > > After it I tried to give the path, but i think gem is not on my system > > yet, so it is kinda useless, but I tried, maybe... > > (from here:https://help.ubuntu.com/community/RubyOnRails) > > I tried this: export PATH=/var/lib/gems/1.8/bin:$PATH > > After itstillneither chmod or setup.rb runs. > > > I tried it 2 more time, once only from Synaptic :D, and then the same > > way what u suggested (of course first delete every gem for gem list, > > than remove gem, then remove ruby, than restart the procedure). > > > I also tried irb, than setup.rb, it says undefined local variable, > > from the directory where it should be. > > > Finally I stopped here, in the 5th point, please help me go on! (It is > > important for me, to get involved this Ubuntu community - without > > Rails it seems hopeless. :O) > > you need to do in step 5 the following: > > Don''t need to chmod the file. The permission denied meant that you > need to be root to have access to the path described. > > Try this in step 5) > > sudo ruby setup.rb > > Try that and report back. > > All the best, > > Fidel.-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.