I am so stoked to learn rails. i am on an iMac so i know it's pre-
installed. I have installed rubystack.
I would like to know how to start my project etc. I have tried a
number of tutorials including creating a simple blog from the
rails.org site but i fall down every time at, what i think is the same
place.
Yesterday i got as far as getting the "Welcome aboard" page running,
which i presume means my servers etc are on.
Today, however, i started the server and if i didn't get this message:
"/Applications/rubystack-1.6-0/ruby/bin/.ruby.bin: No such file or
directory — scripts/server (LoadError)"
i got others such as: the "welcome aboard" page which goes mental if
you click the drop down link at the top. it says "something went wrong
and we have been notified" or something like that.
I have never used Mac, so essentially can’t you much. But you seem to mistyping “script/server” as “scripts/server”, ie, you should use script (singular)
Thanks for your reply. i just changed it to script/server and got
this: Rails requires RubyGems >= 1.3.1. Please install RubyGems and
try again: http://rubygems.rubyforge.org
I am pretty sure the gems were there yesterday and i dont think i did
anything that would have got rid of them.
Thanks for your reply. I had a look at my database.yml file and the
socket path is correctly referenced.
i did rake db:create and got this:
(in /Applications/rubystack-1.6-0/projects/rubystack)
Missing the Rails 2.3.2 gem. Please `gem install -v=2.3.2 rails`,
update your RAILS_GEM_VERSION setting in config/environment.rb for the
Rails version you do have installed, or comment out RAILS_GEM_VERSION
to use the latest version installed.
so i did what it told me and entered this: gem install -v=2.3.2 rails
and i got this back: WARNING: Installing to ~/.gem since /usr/local/
lib/ruby/gems/1.8 and
/usr/local/bin aren't both writable.
WARNING: You don't have /Users/bradbucceri/.gem/ruby/1.8/bin in your
PATH,
gem executables will not run.
You should install any gem with sudo
example: sudo gem install rails
Anyway, I guess, you generated the application you are working one with a different rails version than it is currently installed. So I think, updating RAILS_GEM_VERSION with the correct version will be much simpler. Try that. Or if it is just a sample app, discard it, and generate a new one.
ok, so i entered this sudo gem install -v=2.3.2 rails
it gave me this:
Successfully installed actionmailer-2.3.2
Successfully installed activeresource-2.3.2
Successfully installed rails-2.3.2
3 gems installed
Installing ri documentation for actionmailer-2.3.2...
Installing ri documentation for activeresource-2.3.2...
Installing ri documentation for rails-2.3.2...
Installing RDoc documentation for actionmailer-2.3.2...
Installing RDoc documentation for activeresource-2.3.2...
Installing RDoc documentation for rails-2.3.2...
so i then tried this again: rake db:create
and it gave me this:
(in /Applications/rubystack-1.6-0/projects/rubystack)
!!! The bundled mysql.rb driver has been removed from Rails 2.2.
Please install the mysql gem and try again: gem install mysql.
rake aborted!
no such file to load -- mysql
Building native extensions. This could take a while...
ERROR: Error installing mysql:
ERROR: Failed to build gem native extension.
/usr/local/bin/ruby extconf.rb
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lm... yes
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lz... yes
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lsocket... no
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lnsl... no
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lmygcc... no
checking for mysql_query() in -lmysqlclient... no
*** 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.
Gem files will remain installed in /usr/local/lib/ruby/gems/1.8/gems/
mysql-2.8.1 for inspection.
Results logged to /usr/local/lib/ruby/gems/1.8/gems/mysql-2.8.1/ext/
mysql_api/gem_make.out
is there a specific directory or folder i should be in to do this?
Okay, I suspected that this will be your next question Do you have mysql (as in database) installed? Also, I believe you need to install devel packages for mysql. I don’t know how to install packages on a Mac, so please use Internet search.
I cant seem to figure this out at the moment, but thank you very much
for your help.
Brad
Do you have XCode (Mac OS X developer tools) installed? The installer is
on your OS install disk, or can be downloaded free from
www.apple.com/developer.
Also, try using SQLite, instead of jumping into MySQL. You will need to
change your database.yml file to look something like:
I cant seem to figure this out at the moment, but thank you very much
for your help.
Brad
Do you have XCode (Mac OS X developer tools) installed? The installer is
on your OS install disk, or can be downloaded free from
www.apple.com/developer.
Also, try using SQLite, instead of jumping into MySQL. You will need to
change your database.yml file to look something like:
and I don't recall if OS X comes with the SQLite gem installed, so do:
sudo gem install sqlite3-ruby
I do not think I would advise using SQLite -- it's kind of underpowered
for Rails, as I understand. I would, however, suggest using PostgreSQL
instead of mySQL.
There are many websites with instructions on how to get all this
running. If you find a tutorial for Tiger or earlier, just disregard
the part about installing Ruby.
However, I'm not sure why you bothered with Rubystack. Mac OS's dev
tools include Ruby and Rails already, and the other components are easy
to install on their own. If you type 'which ruby', does that point to
Apple's Ruby or Rubystack's Ruby? Some of this might be path issues.
i got to point 7 where is says to start the server after doing
everything that is says above it.
I got this error from the debugger:
[Session started at 2009-09-10 09:20:44 +0100.]
env: ruby: No such file or directory
The Debugger has exited with status 127.The Debugger has exited with
status 127.
On the other forum, someone suggested that i use rubystack and thats
where i started having the other problems listed above. if you could
tell me what is up with the error above i will be more than happy