Product library rails server9/13/2023 ![]() ![]() I'm not quite sure how, but I'll tell you what I did anyway. I've had this exact same problem a few days ago. I've tried everything google can give me! Any help much appreciated. If I use the old mysql gem, WEBrick boots fine. The error mentions Reason: image not found - /Library/Ruby/Gems/1.8/gems/mysql2-0.2.6/lib/mysql2/mysql2.bundleĪnd yet jontybrook$ cd /Library/Ruby/Gems/1.8/gems/mysql2-0.2.6/lib/mysql2Ĭlient.rb em.rb error.rb mysql2.bundle result.rb MySQL seems to be running fine and my Gemfile references mysql2, my database.yml file seems ok also. Reason: image not found - /Library/Ruby/Gems/1.8/gems/mysql2-0.2.6/lib/mysql2/mysql2.bundleįrom /Library/Ruby/Gems/1.8/gems/mysql2-0.2.6/lib/mysql2.rb:7įrom /Library/Ruby/Gems/1.8/gems/bundler-1.0.7/lib/bundler/runtime.rb:64:in `require'įrom /Library/Ruby/Gems/1.8/gems/bundler-1.0.7/lib/bundler/runtime.rb:62:in `each'įrom /Library/Ruby/Gems/1.8/gems/bundler-1.0.7/lib/bundler/runtime.rb:62:in `require'įrom /Library/Ruby/Gems/1.8/gems/bundler-1.0.7/lib/bundler/runtime.rb:51:in `each'įrom /Library/Ruby/Gems/1.8/gems/bundler-1.0.7/lib/bundler/runtime.rb:51:in `require'įrom /Library/Ruby/Gems/1.8/gems/bundler-1.0.7/lib/bundler.rb:112:in `require'įrom /Users/jontybrook/Dropbox/CODING/simple_cms/config/application.rb:7įrom /Library/Ruby/Gems/1.8/gems/railties-3.0.3/lib/rails/commands.rb:28:in `require'įrom /Library/Ruby/Gems/1.8/gems/railties-3.0.3/lib/rails/commands.rb:28įrom /Library/Ruby/Gems/1.8/gems/railties-3.0.3/lib/rails/commands.rb:27:in `tap'įrom /Library/Ruby/Gems/1.8/gems/railties-3.0.3/lib/rails/commands.rb:27Īs far as I can tell the problem is with the mysql2 gem. Referenced from: /Library/Ruby/Gems/1.8/gems/mysql2-0.2.6/lib/mysql2/mysql2.bundle ![]() Library/Ruby/Gems/1.8/gems/mysql2-0.2.6/lib/mysql2/mysql2.bundle: dlopen(/Library/Ruby/Gems/1.8/gems/mysql2-0.2.6/lib/mysql2/mysql2.bundle, 9): Library not loaded: libmysqlclient.16.dylib (LoadError) Upon running this I get: jontybrook$ rails server All was going well until I created my first project and tried to run rails server I've installed Rails 3, gem, mysql on my Snow Leopard machine. In the db directory, you will find the DB schema and migration files.I've been struggling with this for some time. In the config directory, you will find configuration files for the application, environments, the database, routes, etc. As Rails was created following the MVC (Model-View-Controller) pattern, you will find there are files for models, controllers and views in appropriate directories. In the app directory, you will find the main files for the application. To provide your DB settings, edit the development settings in config/database.yml.Īnother often used option is api, which configures the application with limited middleware, only for API-like applications. Rails runs the application within the specified environment (for starting app locally environment called “development” is used as default). The database configuration is located in the config/database.yml file. If you want to use different DB from the beginning, you can provide the DB from the following option: $ rails new my_amazing_rails_app -database postgresql The default database used by Rails is SQLite. How to set up a Ruby on Rails development environment? Based on this file both rbenv and rvm will try to use the proper Ruby version or will prompt installing the missing one. ruby-version file (simple text file with the Ruby version number). It’s important to mention that in your project directory, you can create a. Different versions of Ruby can be quickly downloaded and installed with the install command, just like so: $ rvm install 2.7.0 Then fetching rvm and installing the latest version of Ruby just after that: $ curl -sSL | bash -s stable -rubyģ. Installing rvm is quite similar to rbenv, and again, there are only few commands that need to be run in the console:ġ. Rvm is an alternative tool to do the same thing and generally it’s not a good idea to use them both at the same time - besides, there really is no point. If you have already installed Ruby using rbenv, your work is complete. ![]()
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |